[Tex/LaTex] Vector with boldface and a hat on top

amsmathbmboldmathvector

Could one of you help me on how to get the following: I need a boldface vector with a hat on top, something like the vector with boldface and a hat as below:

${\mathbf \hat{p}}$ or $\bm{\hat{p}}$

Both the above mentioned methods do NOT seem to work.

Best Answer

  • If you want just the letter "p" to be rendered in bold while the "hat" symbol should be rendered in normal weight, you could use either one of the following methods:

    $\hat{\mathbf{p}}$,  $\hat{\bm{p}}$
    

    enter image description here

    Which method you should use depends on whether you want the letter "p" in upright-bold or slanted-bold.

  • If both the letter "p" and the "hat" symbol should be typeset in bold, and the letter "p" should be in slanted-bold form, one of the following methods gets the job done.

    $\boldsymbol{\hat{p}}$, $\bm{\hat{p}}$
    

    enter image description here

  • Finally, if you need the hat symbol to be bold and the letter "p" to be in upright-bold rather than in slanted-bold, try

    $\boldsymbol{\hat{\mathbf{p}}}$
    

    enter image description here


The full MWE:

\documentclass{article}
\usepackage{bm} % for \bm macro
\begin{document}
$\hat{\mathbf{p}}$ \quad  $\hat{\bm{p}}$ 

$\boldsymbol{\hat{p}}$ \quad $\bm{\hat{p}}$

$\boldsymbol{\hat{\mathbf{p}}}$
\end{document}
Related Question