Probably a pretty simple question, but how do I make a hyphen in a LaTeX equation?
Currently I have:
\begin{equation}
F-score = ....
\end{equation}
But it renders as F – score when I want F-score.
Suggestions?
math-mode
Probably a pretty simple question, but how do I make a hyphen in a LaTeX equation?
Currently I have:
\begin{equation}
F-score = ....
\end{equation}
But it renders as F – score when I want F-score.
Suggestions?
Best Answer
F-score
will be interpreted as "F" "minus" "s" "c" "o" "r" "e". With the incorrect spacing that results from the five different consecutive letters, formatted as if it were the product of five variables.Whenever you want text in math mode (you do here, since
F-score
is descriptive), you want a\text...
command.Since it looks like a variable, then
\textit{F-score}
is ok (formats in italic).If you are going to reuse the variable, you can make a command:
Beware of
\DeclareMathOperator
which will use funky spacing. Its use is for mathematical functions likesin
orlog
which take an argument: notice the funky spacing in2\log 3
. This may be what you want: if you'll be writing,F-score(\mu)
then you should use\DeclareMathOperator
.