Archive for September, 2007

XML Character Entities Cheat Sheet

Sunday, September 23rd, 2007

That key on your keyboard that you probably use for quotations and apostrophes isn’t actually a quotation or an apostrophe key! It’s a remnant from the typewriter era where typewriters had only a small subset of characters that were normally available in a printer’s type case. With computers and the era of desktop publishing, we’ve gone far beyond typewriters and can now be our own typesetters—you just have to know when and how to use the right characters. And trust me, your pages will look a lot spicier and much more professional when you get these down.

When writing your XML/XHTML documents you’ll want to type in these codes to get the character you want to display properly. These are called XML decimal character entities. It’s quite a mouthful, but I’ve found that they have greater support in the wild when compared to the named entities you might be familiar with such as &#ldquo;. Keep in mind that a lot of the especially tricky characters outlined below have important rules. Don’t be intimidated, just do it! Using the proper characters will spice up your documents!

Here’s a helpful little reference that I use all the time!

[—] em dash (—)
• breaks in thought
• to enclose a clause like with parentheses
• open ranges
• century vague years
• two em dashes for missing letters
• three em dashes for missing words

[–] en dash (–)
• closed numerical ranges
• indicating a connection
• showing joint authors
• compounding a hyphenation with an adjective

[‒] figure dash (‒)
• linking numbers together which are not a range
• telephone numbers

[−] minus sign (−)
• subtraction

[‐] hyphen (‐)
• joining compound words

[“] left double quotation mark (“)
• exact quotations

[”] right double quotation mark (”)
• exact quotations

[‘] left single quotation mark (‘)

[’] right single quotation mark (’)
• preferred character for use as an apostrophe

[…] ellipsis (…)
• before periods for one or more missing words
• after periods for one or more missing sentences
• with no periods for trailing thought

A lot of this information came from a great A List Apart article titled “The Trouble With EM ’n EN (and Other Shady Characters)” by Peter Sheerin as well as from a Wikipedia page on Dashes.

Solution to error adding Sensors Applet

Sunday, September 9th, 2007

I’m running Fedora 7 with the proprietary Nvidia drivers. After an upgrade to the Sensors Applet, I found that I could no longer add it to my panel. It gave me this error:

The panel encountered a problem while loading “OAFIID:SensorsApplet”.

Little did I know that an awesome new feature had been added and broke the applet. This feature was temperature monitoring for Nvidia graphics cards! When I was trying to add the applet to the panel, the sensor applet attempted to find out my GPU temperature, but failed because of a missing package. By installing the “libXNVCTRL” package, I was able to give the sensors applet the API it wanted and get things working just fine.
(more…)