3

I'm attempting to center the \faPiedPiper symbol over a single letter like so:

\documentclass[letterpaper,12pt]{article}
\usepackage{fontawesome, amsmath, fourier}
\begin{document}
$\overset{\text{\faPiedPiper}}{X}$
\end{document}

but I'm getting off-centered spacing as follows sample output

What's the best way to fix this?

3

With some trial and error:

\documentclass{article}
\usepackage{fontawesome,fourier,amsmath,accents}

\newcommand{\fancyhatsymbol}{\text{\normalfont\faPiedPiper}\mspace{-6mu}}
\newcommand{\fancyhat}[1]{\accentset{\fancyhatsymbol}{#1\mspace{2mu}}}

\begin{document}

$\fancyhat{X}$   

\end{document}

Note that \accentset uses a smaller size than \overset.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.