[Tex/LaTex] How to type a circumflex over a greek letter in text mode

accentsgreektext-mode

I am trying to type a circumflex over a Greek letter in \chapter. In particular, I'm using this package:

\usepackage{textgreek}

However, if I write \^{\textPi} I get this result:

enter image description here

while I want the circumfex to be over the letter. Can anyone help me to solve this issue?

Best Answer

The \^{\textPi} construction cannot, unfortunately, work. Here's a workaround:

\documentclass{book}
\usepackage{textgreek}

\DeclareRobustCommand{\greekhat}[1]{%
  \leavevmode
  \vbox{\offinterlineskip
    \ialign{%
      \hfil##\hfil\cr
      \^{}\cr
      \noalign{\kern-1ex}
      #1\cr
    }%
  }%
}

\begin{document}

\chapter{A title with \greekhat{\textPi}}

And a \greekhat{\textPi} in text.

\end{document}

enter image description here

Are you sure you don't want this in math mode, which would be $\hat{\Pi}$?

In my opinion, math shouldn't be emboldened if in titles, but you can do it.

\documentclass{book}
\usepackage{amsmath,bm}

\begin{document}

\chapter{A title with $\bm{\hat{\Pi}}$ or $\hat{\Pi}$}

And a $\hat{\Pi}$ in math as well.

\end{document}

enter image description here