[Tex/LaTex] How to change margins in “elsarticle” document class

elsarticlemargins

I am using "elsarticle" document class for my Elsevier paper and I want to change the margins in all side to 2.5cm. How can I do this? I used the code below:

\documentclass{elsarticle}

\usepackage{amssymb}

\doublespacing

\begin{document}

\begin{frontmatter}

\title{...}

....

....

\nocite{*}

\bibliographystyle{elsarticle-harv}

\bibliography{pose}

\end{document}

I used the code below to control the margins, but the height of the text is not proper.

\oddsidemargin = 0cm
\topmargin = 0cm
\textheight = 25cm
\textwidth = 16cm

because A4 paper is 21*30cm and I reduced 5cm and wrote 15*25 without any excess margin. What is the solution?

regards.

Best Answer

The solution is to use the geometry package.

\documentclass{elsarticle}

% \usepackage[top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}
\usepackage[margin=2.5cm]{geometry}% by courtesy of Mico

\usepackage{lipsum}

\begin{document}

\lipsum[1-10]

\end{document}