I found the following command for increasing the space between an \underline
and its corresponding text:
\newcommand{\ovF}[1]{
$\overline{\raisebox{0pt}[\dimexpr\height+1mm\relax]{#1}}$
}
This command works well e.g. in
\ovF{a}
By trying to overline a term that needs a math environment it works as well, e.g.
\ovF{\varphi}
However I want to use my command in an equation, e.g.
\begin{equation}
\ovF{a}
\ovF{\varphi}
\end{equation}
Neither the first nor the second line works for me but I couldn't find any reason for this yet. I got the assumption that the predefined math mode of the equation brings me some issues. Therefore I tried to understand those issues by using this command without the equation in a math mode.
$\ovF{a}$
$\ovF{\varphi}$
Also none of them worked. For all of them I get the same Error message:
! Missing $ inserted.<inserted text>$
So my question is: What should I do/change to use my command in a math environment, especially in a equation? Did I make something wrong?
I am sorry if I made any mistakes. I am new to this board and its my first question.
Best Answer
Generally, a function should be targeted for either math or text mode. However, since you seem to want something that functions in all modes, I give it a spin, with a bit of overkill. It obeys math styles, etc.