# Can't use "arabtex" package with this template: Option clash for package babel

I am using this thesis template. I need to add some arabic text. I need to add this preamble:

\usepackage{arabtex}
\usepackage[utf8]{inputenc}
\usepackage[LFE,LAE]{fontenc}
\usepackage[arabic]{babel}


Which works for me in a simple article. But with this thesis template, it generates errors:

Option clash for package babel.

\begin{alwayssingle} on input line 166 ended by \end{abstract}. \end{abstract}

\begin{abstract} on input line 166 ended by \end{romanpages}. \end{romanpages}

\begin{romanpages} on input line 148 ended by \end{document}. \end{document}


Can you identify how to make these preamble not conflict with this template?

EDIT:

This code works in separate tex file.
\documentclass[11pt,a4paper]{report}
\usepackage{arabtex}
\usepackage[utf8]{inputenc}
\usepackage[LFE,LAE]{fontenc}
\usepackage[arabic]{babel}
\begin{document}
\chapter{علوم الحاسوب}
\section{تاريخ}
\begin{otherlanguage}{arabic}
سلام
\end{otherlanguage}
\end{document}


But the problems arise when I try to incorporate this in this thesis template.

The class file does \usepackage[greek,latin,english]{babel} (which in my opinion is not a thing a class should do).

This is such a common problem that the babel manual has a note telling you the way out. Page 6 of the manual to v3.40 says

Some classes load babel with a hardcoded language option. Sometimes, the main language could be overridden with something like that before \documentclass:

\PassOptionsToPackage{main=english}{babel}


\PassOptionsToPackage{main=arabic}{babel}

and remove \usepackage[arabic]{babel}.
• Still not working. Do you mean I write \PassOptionsToPackage{main=arabic}{babel} before the \documentclass{ociamthesis} ?? Also, shall I keep or remove the other packages (see my OP): arabtex, inputenc, fontenc? Please clarify I inserted the \PassOptionsToPackage{main=english}{babel} before the \documentclass and removed \usepackage[arabic]{babel} as you suggested but I got errors. Feb 23, 2020 at 13:01
• @seq yes, before \documentclass. your question was only about the option clash error. My solution worked in a MWE I created for myself since you didn't provide one. If you have different errors now, please open a new question and please include a MWE, then Feb 23, 2020 at 13:29