[Tex/LaTex] Undefined control sequence error

document-classesequations

it might be a stupid question but I cannot see where the mistake is in this code:

\documentclass[12pt]{article}

\usepackage{amssymb}

\renewcommand{\baselinestretch}{1.5}
\setlength{\topmargin}{0cm}
\setlength{\oddsidemargin}{0cm}
\setlength{\leftmargin}{0cm}
\setlength{\textwidth}{16cm}
\setlength{\textheight}{21cm}
\renewcommand{\hoffset}{1cm}
\renewcommand{\voffset}{1cm}

\begin{document}

\begin{equation}
H_{0}:\rho_{1}<0\text{ and }\rho_{2}>0
\end{equation}
$vs$
\begin{equation}
H_{A}:\rho _{1}\geqslant 0\text{and/or}\rho _{2}\leqslant 0.  \label{12}
\end{equation}

\end{document}

I got an error message saying "Undefined control sequence". Can someone help me? Thanks in advance.

Best Answer

The undefined control sequence is \text, which is defined by package amstext, which is automatically loaded by amsmath. Thus, the minimal

\usepackage{amstext}

or the more powerful

\usepackage{amsmath}

fixes the issue.