# Placing two icons from fontawesome5 above each other

Normally you can do $\overset{a}{b}$ which results in :

Is there a way to do something similar using icons from the fontawesome5 package? if I try $\overset{\faEye}{\faHeartbeat}$ I get the following:

• Why math mode? Normally I would use a tabular. – Ulrike Fischer May 3 '20 at 21:31
• I need to place text next to it in a section header. – Mohamed Khamis May 3 '20 at 21:33
• why should that be a problem? – Ulrike Fischer May 3 '20 at 21:36
• You can use \overset, \documentclass{article} \usepackage{fontawesome} \usepackage{amsmath} \begin{document} $\overset{\mbox{\faEye}}{\mbox{\faHeartbeat}}$ or $\overset{\text{\faEye}}{\text{\faHeartbeat}}$ \end{document}, but I'd agree with @UlrikeFischer that there are likely better ways. – user194703 May 3 '20 at 22:04
• @Schrödinger'scat putting it inside \mbox did the trick. Thanks! do you want to add this as an answer so I would accept it? – Mohamed Khamis May 3 '20 at 22:10

One cannot use the font awesome symbols in math mode. So, if you wish to use them in some math construction like \overset, say, you need to switch to text mode. This can be done with \mbox or \text (from amsmath, which also respects the size of the surrounding).
\documentclass{article}
$\overset{\mbox{\faEye}}{\mbox{\faHeartbeat}}$ or
$\overset{\text{\faEye}}{\text{\faHeartbeat}}$