I have an equation within the statement of one of my theorems. Within this equation, I have some text to name a function. However, when this equation appears within the theorem environment, the output treats each letter of my function name as though it were a variable. How can I fix this?
\documentclass[11pt]{article}
\usepackage{amsmath}
\newtheorem{theorem}{Theorem}
\begin{document}
$\text{Function}(x) = 1$
\begin{theorem}
$\text{Function}(x) = 1$
\end{theorem}
\end{document}


\mathrmworks fine. But why is there a problem with\text? – user1577636 May 10 '14 at 15:15\textcommand fromamsmathmatches the local text font. – Paul Gessler May 10 '14 at 15:15\DeclareMathOperator{\Func}{Function}in the preamble and then$\Func(x) = 1$. – Gonzalo Medina May 10 '14 at 15:22\textup.\mathrmwill give you a letter spacing as though they were the variables F, u, n, c, &c. – Bernard May 10 '14 at 16:34\textupacts only on the shape, so boldface would be preserved; unlikely, but possible. – egreg May 10 '14 at 21:20\textup{\mdseries…}if one doesn't want boldface? – Bernard May 10 '14 at 21:26\textnormalis easier. However, for that case,\operatorname{Function}or Gonzalo's proposal is better. – egreg May 10 '14 at 22:03