Hello I am using a fancyhdr package and I want that the page number appear in the right side of the heading for odd pages and in the left side of the heading for the left side. I alredy used the command \fancyhead[RO,LE]{\thepage} but it does not work. Here is my code:
\documentclass[twoside,12pt]{elsarticle}%
\usepackage{amscd}
\usepackage{thmdefs}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{fancyhdr}
\usepackage[margin=0.5in]{geometry}
\setcounter{MaxMatrixCols}{30}
\providecommand{\U}[1]{\protect\rule{.1in}{.1in}}
\numberwithin{equation}{section}
\newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\newtheorem{condition}[theorem]{Condition}
\journal{}
\pagestyle{fancy}
\newcommand\shorttitle{------------------------------}
\newcommand\authors{--------------------------}
\fancyhf{}
\renewcommand\headrulewidth{0pt}
\fancyhead[C]{%
\ifodd\value{page}
\small\scshape\authors
\else
\small\scshape\shorttitle
\fi }
\fancyhead[RO,LE]{\thepage}
\begin{document}
HELLO!!!!
\end{document}
I think it is something related to the class elsarticle, because if I change to another the class everything works well.
