[Tex/LaTex] Location of superscript in LaTeX

superscripts

From the attached figure, you can see the star on the left-hand side is higher than the star on the right-hand side. Is it possible to lower the star on the left to the same height as the right-hand side?

\documentclass[]{article}
\usepackage{amsmath}

\begin{document}
\[
    \hat{\boldsymbol{\beta}}^{*} = \hat{\beta}^{*}
\]
\end{document}

enter image description here

Best Answer

It is better to use the bm package for bold math italics, as it gets the positioning of accents and the spacing for sub- and superscripts right.

The bm package will also redefine \boldsymbol, so you don't have to replace all \boldsymbol with \bm throughout the document. Therefore, make sure to load bm after amsbsy, which is loaded by amsmath. Still, I find it highly appealing to use \bm as it has only two letters as opposed to the ten letters of \boldsymbol.

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

\begin{document}
\[
    \hat{\bm{\beta}}^{*} = \hat{\beta}^{*}
\]
\end{document}

enter image description here