The following:
\begin{align*}
F
=
{}&a^2+b^2=c^2
\notag\\\rm{subject~to} & \;
5+1=6 \;\rm{ and }\; a+b=c.
\end{align*}
produces a+b=c that isn't in math mode. Why?
The following:
\begin{align*}
F
=
{}&a^2+b^2=c^2
\notag\\\rm{subject~to} & \;
5+1=6 \;\rm{ and }\; a+b=c.
\end{align*}
produces a+b=c that isn't in math mode. Why?
The issue with the incorrect -- it should be {\rm ...}, not \rm{...} -- and inappropriate -- \rm is badly deprecated; use \text{...} -- usage of \rm would appear to be just severe of several problems contained in the code.
No purposeful aligning appears to be going on across the two rows. Hence, use a gather* environment, not an align* environment.
Don't use \notag: there's simply no point doing so in either a gather* or an align* environment.
Place the entire second row in the argument of a \text directive, and use inline math mode for the two formulas contained in the second row.
(Note that I'm note passing judgment on the actual mathematics -- that's not really the subject of this posting, is it?)
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{gather*} % not "align*"
F = a^2+b^2=c^2 \\
\text{subject to $5+1=6$ and $a+b=c$.}
\end{gather*}
\end{document}
\rm in curly bracket
\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
F
=
{}&a^2+b^2=c^2
\\{\rm subject~to} & \;
5+1=6 \;{\rm and }\; a+b=c.
\end{align*}
\end{document}
\rmis a switch and not a command taking an argument. Use\text{...}instead. – Henri Menke Sep 21 '17 at 23:24\rmwhich (1) shouldn't be used in LaTeX since it was made obsolete a few decades ago and (2) does not take an argument, since it is a switch. It switches to the default serif family until the end of the current group or the end of the document. You haven't provided a complete example, but this has zilch to do withalignand everything to do with abuse of font macros. – cfr Sep 21 '17 at 23:24\text{subject toand\text{ and }. Don't use\rm. – Mico Sep 21 '17 at 23:25