Skip to content
Snippets Groups Projects
Commit c53ef658 authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

better handling of language options

parent 8e411111
Branches
No related tags found
No related merge requests found
......@@ -5,23 +5,21 @@
\ProvidesClass{\PTB@classname}[2022/07/30 v1.0.0 PTB beamer class (RN)]
\newcommand*\PTB@babel@options{}
\newcommand*\PTB@tempa{}
\newcommand*\PTB@tempb{}
\newcommand*\PTB@tempc{}
\DeclareOption{ngerman}{%
\edef\PTB@babel@options{english,main=\CurrentOption}
\PassOptionsToPackage{english,\CurrentOption}{translator}
}
\DeclareOption{german}{%
\edef\PTB@babel@options{english,main=\CurrentOption}
\PassOptionsToPackage{english,\CurrentOption}{translator}
}
\DeclareOption{english}{%
\edef\PTB@babel@options{ngerman,main=\CurrentOption}
\PassOptionsToPackage{ngerman,\CurrentOption}{translator}
}
% Default language should be `ngerman'
\def\PTB@tempa{english}
\def\PTB@tempb{english,ngerman}
\@for\CurrentOption:=\@classoptionslist\do{%
\ifx\CurrentOption\PTB@tempa
\def\PTB@tempb{ngerman}% Only add `english' if not already present
\fi
}%
\edef\@classoptionslist{\PTB@tempb,\@classoptionslist}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{beamer}}
\ExecuteOptions{ngerman}
\ProcessOptions\relax
\ProcessOptions*\relax
\RequirePackage{iftex}%
\iftutex% LuaTeX or XeTeX
......@@ -33,14 +31,11 @@
}
\fi
\newcommand*\PTB@tempa{}
\newcommand*\PTB@tempb{}
\newcommand*\PTB@tempc{}
\newif\if@PTB@finalpage \@PTB@finalpagefalse
\RequirePackage[\PTB@babel@options]{babel}
\LoadClass[onlytextwidth]{beamer}
\RequirePackage{babel}
\RequirePackage{amsmath}
\RequirePackage{unicode-math}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment