14

I am getting an option clash for babel using: \usepackage[greek,english]{babel}. Here is the output:

! LaTeX Error: Option clash for package babel.

Does anyone know what might be causing this? I've tried Googling and have seen many others use these options together, but I cannot get it to work. Here is my full latex heading:

\documentclass[article,11pt]{Latex/Classes/PhDthesisPSnPDF}
\raggedbottom
\setcitestyle{square}
\usepackage[normalem]{ulem}
\usepackage[greek,english]{babel}
\usepackage{amsmath}
\usepackage{amstext}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{algorithm}
\usepackage{algorithmic}
\makeatletter
\def\NAT@def@citea{\def\@citea{\NAT@separator}}
\makeatother
6
  • 2
    It's because the class you're using (I googled for it and found it here) already calls babel with the english option. The solution is to pass the greek option when loading the class file (\documentclass[greek,<...>]{<class>}. You could also call it with a \PassOptionsToPackage{greek,english}{babel} before \documentclass (as shown in the answers to this question)
    – henrique
    Sep 25, 2013 at 18:24
  • @henrique, why don't you make this comment an answer?
    – nickie
    Sep 25, 2013 at 18:32
  • unrelated to the problem but the argument to \documentclass is supposed to be the name of a class not a file path \documentclass[article,11pt]{Latex/Classes/PhDthesisPSnPDF} should be \documentclass[article,11pt]{PhDthesisPSnPDF} after ensurimg that latex/classes is in your TeX input path. Sep 25, 2013 at 20:17
  • @DavidCarlisle here's how the class file names it: \ProvidesClass{Latex/Classes/PhDthesisPSnPDF}[2007/09/06 v2 PhD thesis class]
    – henrique
    Sep 25, 2013 at 22:09
  • @nickie, I did so, but I think it's a possible duplicate of Conflict between Options of Packages
    – henrique
    Sep 25, 2013 at 22:12

1 Answer 1

15

It's because the class you're using (available here) already calls babel with the english option. The solution is to pass the greek option when loading the class file with

\documentclass[greek,<...>]{<class>}

You could also call it with a \PassOptionsToPackage{greek,english}{babel} before loading the package, therefore before \documentclass, since the class is loading it.

See:

3
  • 1
    In my opinion classes should never load babel or inputenc: it just makes life more difficult for users. It's surely simpler telling them to load babel with the desired language options.
    – egreg
    Sep 25, 2013 at 22:20
  • Note that if you're using \PassOptionsToPackage, this should be called before the \usepackage command. This may seem trivial, but isn't always for a newbie.
    – Keelan
    Sep 9, 2014 at 17:53
  • @CamilStaps Good point. I added some more links to (I hope) help clarify this
    – henrique
    Sep 12, 2014 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.