Revised Oct 23, 2012
A common question I get (at least common in Unicode terms) is what the code is for the p-hat (p̂) symbol and x-bar (x̄) symbols in statistics. Although these are common symbols, they haven"t made it as a single character into Unicode (much like there thermodynamic dot symbols are half missing unless they are also in Old Irish or another foreign language"s spelling system.
You are watching: X with a line through it
The good news is that they can be created in Unicode, but it"s quirky. The trick here is to forget math and think phonetics. There is a mechanism to place any diacritic/accent mark over any letter using one of the combining diacritics These are accents, but with a spacing specification that basically says to go backwards over the previous letter.
There"s a list of various combing diacritics for HTML at our sister site, Penn State Computing with Accents Diacritics page, but I"ll explain how it works for x̄ and p̂
For HTML, I recommend inputting the base letter (x or p) then the appropriate numeric escape code for the combining diacritic. See code examples below:
View the HTML Code
x-bar = x̄ or x̄ (hex)
p-hat = x̂ or x̂ (hex)
x-bar = x̄ or x̄ (hex)
p-hat = p̂ or p̂ (hex)
If the result of your code is something like p^or ^p rather than p̂, the problem is usually the font. Relatively few fonts support combining diacritics well (not even math fonts support diacritics well). Those that do are phonetics oriented and these include include:Windows - Arial Unicode MS SIL Fonts - The SIL has created
The first two fonts come from Microsoft/Apple, are commonly installed, and also include math symbols...but they are sans-serif fonts. If you want a serif font, you may want to specify one of the other serif phonetics fonts, then point users to it (but specify Arial Unicode/Lucida Grande as backups). Not a very pretty solution at the moment.
And now the fun really begins. You can input these characters in other programs (see below), but editing them will be odd (see below). Here"s the procedure:Switch to a font which supports combining diacritics and type the base letter (x or p in this case). Type a space and move your cursor back (you"ll thank me for this tip): Then you can insert the combining diacritic:
When you edit, you will discover that sometimes you will delete the accent, and sometimes you will delete the letter beneath the accent (very entertaining). You may need to undo your delete move your cursor with your arrow keys when that happens. It doesn"t always look like the cursor is moving, but it is in Unicode text land. When you are trying to type a nasalized open-o /ɔ̃/, you do get some practice....
See more: Can You Put Human Eye Drops In Cats Eyes, Can You Use Human Eyedrops On Cats
I am a Penn State technology specialist with a degree in linguistics and have maintained the Penn State Computing with Accents page since 2000.
See Elizabeth Pyatt"s Homepage (ejp10
The standard commenting utility has been disabled due to hungry spam. If you have a comment, please feel free to drop me a line at (ejp10