tags:

views:

109

answers:

2

I wanted to put a bar over my variable such as not(x) and also some set symbols in my web page? How do I incorporate that in my html page.

+6  A: 

For the set symbols, you ought to use unicode HTML entities.

For the line over a variable (p), I'd rather use an alternate symbol for not, such as:
¬p (¬p)

You may also, as a commenter pointed out, use the combining diacritical unicode HTML entity like so:
p̅ (p̅)

Lastly, you may use one of the CSS methods provided.

Triptych
Those are great for the symbols but how about the bar?
Michael Haren
Good point, I like that better, too.
Michael Haren
For a bar you could use the combining diacritic 0x0305 (see http://unicode.org/charts/PDF/U0300.pdf)
Paul Dixon
Very cool Paul; I didn't know about this. Added to my answer.
Triptych
FWIW, that diacritic doesn't work in Google Chrome.
Dominic Rodger
@Dominic - for what it's worth, I'm looking at it right now in Google Chrome.
Triptych
I'd rather track down a tool designed to enter mathematical symbols and then use straight Unicode rather than entities. It will result in more readable source code.
David Dorward
+1  A: 
<div style="text-decoration: overline">X</div>
Harry