TransWikia.com

Babel option clash in scrlttr2 letter

TeX - LaTeX Asked on February 23, 2021

I want to use babel with the english option in an scrlttr2 letter, in order to change today and descriptions for KOMA variables such as fromphone from german to english (‘Phone’ instead of ‘Telefon’ etc.). However, I am getting an option clash for babel

! LaTeX Error: Option clash for package babel.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.20 usepackage
                [utf8]{inputenc}

This is the document:

documentclass[
    sender,
    paper=a4,
    version=last,
    fontsize=11pt,
    DIV=13,
    BCOR=0mm
    ]{scrlttr2}
parskip3mm
parindent0mm % if you want to have no lineskip

usepackage[english]{babel}
usepackage[utf8]{inputenc}
usepackage{csquotes}
usepackage{graphicx}

% Set Font: sans serif Latin Modern
usepackage{lmodern}
renewcommand*familydefault{sfdefault}
usepackage[T1]{fontenc}

% Set Page layout:
usepackage{changepage}
changepage{+3cm}{}{}{}{}{}{}{}{-5cm}
LoadLetterOption{DIN}
LoadLetterOption{thesender}

begin{document}
% subject, date, place:
setkomavar{subject}{Application as Test}
setkomavar{date}{today}
setkomavar{place}{City}

% Set recipient of letter
begin{letter}{
    Company
    Street 233
    12345 City
}
opening{Dear Sir or Madam,}

selectlanguage{english}
dots

Yours sincerely,

vspace{1cm} includegraphics[width=4cm]{signature}  
Name

end{letter}
end{document}

and the thesender.lco file:

ProvidesFile{thesender.lco}

KOMAoptions{%
 fromurl=false,
locfield=wide,
fromalign=left,
foldmarks=off,
firsthead=false
}

RequirePackage[utf8]{inputenc}
RequirePackage[english]{babel}
setkomavar{fromname}{My Name}
setkomavar{fromaddress}{%
  Street 9
  14524 City%
}
setkomavar{fromemail}{[email protected]}
setkomavar{fromphone}{0653/52554325}

setkomavar{location}{%
  raggedright{%
  usekomavar{fromname}
  usekomavar{fromaddress}
  usekomavar*{fromphone}usekomavar{fromphone}
  usekomavar*{fromemail}usekomavar{fromemail}
  }%
}
% ============================

setkomavar{frombank}{}
renewcommand*{raggedsignature}{raggedright}
% ====================

I don’t see that I’m using babel twice with different options or something like that. Apparently though (according to the immediate help), babel has been loaded with the ngerman option. Does anyone see the problem?

Many thanks in advance!

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP