Possible Duplicate:
Cursive text after _
I need to have some subscripted and superscripted text in my thesis document. But when I try to do it the way as H_{2O} or S^{2}. I get an error at that point and if I compile it anyway I get text with so white spaces for the rest of the line. Like,
H_{2O}helloworldwhyisthishappening
Do I need to use some package to have this functionality? I thought it was standard latex. Or may be it is due to conflict with some package. I'm using the university template so don't quite understand what the problem is. I have put the header section where the packages are called below. Please help.
\usepackage{fancyhdr}
\usepackage{verbatim}
\usepackage{acronym}
\usepackage{natbib}
\usepackage{color}
\usepackage[pdftex]{graphicx}
\usepackage{url}
\usepackage{appendix}
\usepackage[font=small,format=plain,labelfont=bf,up,textfont=it,up]{caption}
\usepackage{tikz}
\usetikzlibrary{arrows,automata}
\usepackage{amsfonts,amssymb,amsbsy,amsmath}
\usepackage{listings}