1

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?

  • welcome to tex.sx. try removing the braces around \textPi. i think it shouldn't make any difference, but i can't test it. – barbara beeton Jan 8 '18 at 23:31
  • Thank for the answer, but I still get the same output. – Leo B. Jan 8 '18 at 23:39
4

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

  • Thank you, now it works. I have already used $\hat{\Pi}$ in math mode but I needed something to write the same in \chapter. – Leo B. Jan 9 '18 at 7:53
  • @LeoB. I'm not sure why it should be different. I added something. – egreg Jan 9 '18 at 8:21

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.