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


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?


This code works in separate tex file.
    \chapter{علوم الحاسوب}

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

1 Answer 1


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:


In your case:


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.
    – randomname
    Feb 23, 2020 at 13:01
  • I also added an edit.
    – randomname
    Feb 23, 2020 at 13:05
  • 1
    @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
    – cgnieder
    Feb 23, 2020 at 13:29
  • did you use the template I pointed for your MWE?
    – randomname
    Feb 23, 2020 at 13:43
  • @seq yes, of course I did.
    – cgnieder
    Feb 23, 2020 at 13:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .