From f03053488bebb1f248954dfa1c6577fc1ce6ebb7 Mon Sep 17 00:00:00 2001 From: Rolf Niepraschk <Rolf.Niepraschk@gmx.de> Date: Wed, 12 Mar 2025 21:18:04 +0100 Subject: [PATCH] Bessere Sprachbehandlung --- ptbposter/ptbposter.cls | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/ptbposter/ptbposter.cls b/ptbposter/ptbposter.cls index acb0bfa..dd7d9f5 100644 --- a/ptbposter/ptbposter.cls +++ b/ptbposter/ptbposter.cls @@ -1,12 +1,12 @@ -% Rolf Niepraschk, Rolf.Niepraschk@ptb.de +% Rolf Niepraschk, Rolf.Niepraschk@gmx.de \setcounter{errorcontextlines}{100} \listfiles \NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesClass{ptbposter}[2022/09/21 1.0.2 PTB-Poster (RN)] +\ProvidesClass{ptbposter}[2025/03/12 1.1.0 PTB-Poster (RN)] \newif\ifPTB@useCMYK \PTB@useCMYKfalse % vorerst -\newif\ifPTB@german@ \PTB@german@true +\newif\ifPTB@german@ \PTB@german@false \newdimen\PTB@topmargin % Abstand zum Rahmen \newdimen\PTB@leftmargin % Abstand zum Rahmen @@ -61,6 +61,11 @@ \newcommand*\PTB@layout{} \newcommand*\PTB@target@size{} +\newcommand*\PTB@babel@opt{english,main=ngerman} + +\DeclareOption{english}{\def\PTB@babel@opt{ngerman,main=english}} +\DeclareOption{ngerman}{\def\PTB@babel@opt{english,main=ngerman}} +\DeclareOption{german}{\def\PTB@babel@opt{english,main=ngerman}} \DeclareOption{sanserif}{% noch experimentell! Besser: LuaTeX/XeTeX + OTF \SERIFfalse @@ -121,10 +126,15 @@ \DeclareOption{layout2020}{% \def\PTB@layout{1}% } -\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{babel}} +%\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{babel}} +\DeclareOption*{\OptionNotUsed} \ExecuteOptions{serif,raggedTitle,layout2020} \ProcessOptions\relax +\PassOptionsToPackage{\PTB@babel@opt}{babel} +\RequirePackage{babel} +\iflanguage{ngerman}{\PTB@german@true}{} + \iffalse % The default language should be `ngerman', `english' should also be present. \def\@tempa{english}\def\@tempb{english,ngerman} @@ -198,16 +208,9 @@ \providecommand*\microtypesetup[1]{} -\RequirePackage[english,ngerman]{babel} % ??? - \AtEndOfClass{% - \shorthandon{"}% - \PTB@german@false - \iflanguage{ngerman}{\PTB@german@true}{% - \iflanguage{german}{\PTB@german@true}{}% - } - %\if@tempswa \ifPTB@german@ + \shorthandon{"}% \defineshorthand{"`}{\guillemotright}% \defineshorthand{"'}{\guillemotleft}% \fi -- GitLab