tags:

views:

79

answers:

3

How to put a symbol above (on the head of) another? For example, I wanna produce something like this in one line.

a
#

i.e., 'a' above '#'.

EDIT:

The effect should be almost the same with $#^a# except that 'a' is on the top instead of top right of '#'.

+5  A: 

Use \overset{above}{main} in math mode. In your case, \overset{a}{\#}.

Artelius
That's it. You are fantastic. I searched everywhere but don't found such a thing. Thank you very much.
plmday
Please select my answer as the correct one, then :) - Also, a good LaTeX editor like LEd or LyX makes it much easier to find things like this.
Artelius
I use kile in fact, but did not find it on its list.
plmday
+1  A: 
${a \atop \#}$

or

${a \above 0pt \#}$
Alexey Malistov
Alexey, LaTeX complains the two commands are foreign. Also, the two symbols are put equal size which is not what I wanted. Artelius's answer matches my needs perfectly. Anyway, thank you all the same.
plmday
+1  A: 

If you're using # as an operator, consider defining a new operator for it:

\newcommand{\pound}{\operatornamewithlimits{\#}}

You can then write things like \pound_{n = 1}^N and get:

alt text

Geoff
Thanks for the input, Geoff, I've kept a note for future use.
plmday