I want to put bar over a alphabet, but outside in math mode. how do I do it?

Iamtryingtowritebarsymbolwithsomealphabetsinsidelikethis,

$$H \bar{k}$$


I have more than one alphabet to give bar. I've showed only one though.

It shows a lot of error as it is in out of math mode. How do I give bar in this equation mode?

-
By alphabet do you mean a single letter? And Welcome to TeX.SE. –  percusse Nov 19 '12 at 14:09
Welcome to TeX.SX! Don't leave blank lines in a equation environment! –  egreg Nov 19 '12 at 14:10
I think you are looking for \={k} –  David Carlisle Nov 19 '12 at 14:22
thanx! removed blank lines & that worked like a charm!!! anyway thanx again guys, though i am new to latex but i look forward to contribute to the community.. –  Protik Nov 19 '12 at 14:24
The command \= is the text mode equivalent of \bar.