# Any other way than Babel package?

I have a complex PhD thesis temlate. I need to include a polish (second) abstract, but the hyphenation look terrbile. All the rest of the document is in english. When I try Babel package, Im getting an option clash.

\PassOptionsToPackage{english,polish}{babel}

is also not working:

"! LaTeX Error: Command `\lll' already defined."

• I do not have any experience with Polish typesetting. Have you checked ctan.org/pkg/babel-polish? You probably also want to give ctan.org/pkg/polyglossia and LuaTeX a try. – CampanIgnis Mar 28 '17 at 14:22
• Well, I successfully migrated a 300+ pages project from pdfLaTeX to LuaLaTeX. It was not that much work. But this is up to you. If it is only a short text, you could try to do the hyphenation by yourself. Sometimes this is even faster than looking for an clever solution. – CampanIgnis Mar 28 '17 at 14:26
• @CampanIgnis: Why do you think that with luatex it will be easier to resolve an option clash error? – Ulrike Fischer Mar 28 '17 at 14:31
• @Aleksander You should show a small but complete document (your preamble + some hello world text). Option clash errors are easy to resolve but not if you don't see the code that triggers them. – Ulrike Fischer Mar 28 '17 at 14:33
• @UlrikeFischer: I am sorry. As far as I remember, he wanted a replacement for babel, so I suggested Polyglossia. As far as I know, Polyglossia is designed to work with LuaTeX and XeTeX. – CampanIgnis Mar 28 '17 at 14:34

For mysterious reasons, polish.ldf has

\let\lll=\l \let\LLL=\L
\def\plll{\lll}
\def\pLLL{\LLL}

and, of course, this should be something like

\let\polish@l=\l \let\polish@L=\L
\def\plll{\polish@l}
\def\pLLL{\polish@L}

This is used in some places in order to restore the meaning in case something changed it.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[polish]{babel}

\makeatletter
\let\polish@l=\lll \let\polish@L=\LLL
\let\lll\relax \let\LLL\relax % undefine them
\def\plll{\polish@l}
\def\pLLL{\polish@L}
\makeatother

\usepackage{amssymb}

In your case, the babel package is loaded by the class, so the language options must be given to \documentclass:

\documentclass[
12pt, % The default document font size, options: 10pt, 11pt, 12pt
english, % ngerman for German
polish,
singlespacing, % Single line spacing, alternatives: onehalfspacing or doublespacing
]{MastersDoctoralThesis} % The class file specifying the document structure

\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage[T1]{fontenc} % Output font encoding for international characters
\setcounter{secnumdepth}{4}

\makeatletter
\let\polish@l=\lll \let\polish@L=\LLL
\let\lll\relax \let\LLL\relax % undefine them
\def\plll{\polish@l}
\def\pLLL{\polish@L}
\makeatother

The rest is the same as in your code.

• Thanx. I tried it, but got the same error. But in my case Im putting it to a long template and maybe this is the reason. – Aleksander Mar 28 '17 at 15:09
• @Aleksander The \makeatletter...\makeatother part should go immediately after you load babel. – egreg Mar 28 '17 at 15:11
• @egreg: Imho the class or preamble already loads babel and so there is an option clash. – Ulrike Fischer Mar 28 '17 at 15:12
• @Ulrike Fischer, Yes, it is in the class as a required package. It is too long, so I uploaded a working example here: dropbox.com/s/mxo9brsfrcbk1ft/example.zip?dl=0 – Aleksander Mar 28 '17 at 15:13
• @Aleksander Added the code you should use – egreg Mar 28 '17 at 15:24