[Tex/LaTex] Issue with displaying unit vectors

amsmathmath-modevector

I am using the following command to display unit vectors for my report:

\newcommand{\ihat}{\boldsymbol{\hat{\textbf{\i}}}}
\newcommand{\jhat}{\boldsymbol{\hat{\textbf{\j}}}}

This is my result:

enter image description here

What am I doing wrong? Any help is greatly appreciated!

Best Answer

In proper method, which you can also see in the log. Try this (memoir class not related, just happens to be the basic class in my editor):

\documentclass[a4paper]{memoir}
\usepackage{amsmath,amssymb,bm,mathtools}

\newcommand{\ihat}{\boldsymbol{\hat{\imath}}}
\newcommand{\jhat}{\boldsymbol{\hat{\jmath}}}

\begin{document}

\[
\ihat \quad  \jhat 
\]


\end{document}

enter image description here

EDIT: If you want them upright, then with the packages I used, you code should work. If not, then as usual on this site, please provide a full minimal example that we can compile and test. Sniplets like this usually does not help much