From ee3f9ca89b21a2174f7e427d9d48247b1912e130 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Thu, 13 Jan 2022 03:01:10 +0000
Subject: CTAN sync 202201130301

---
 macros/latex/contrib/tuda-ci/tex/tudapub.cls | 62 +++++++++++-----------------
 1 file changed, 25 insertions(+), 37 deletions(-)

(limited to 'macros/latex/contrib/tuda-ci/tex/tudapub.cls')

diff --git a/macros/latex/contrib/tuda-ci/tex/tudapub.cls b/macros/latex/contrib/tuda-ci/tex/tudapub.cls
index 7ccb4fd236..5a8f082f26 100644
--- a/macros/latex/contrib/tuda-ci/tex/tudapub.cls
+++ b/macros/latex/contrib/tuda-ci/tex/tudapub.cls
@@ -1,4 +1,4 @@
-%% This is file `tudapub.cls' version 3.20 (2021/10/12),
+%% This is file `tudapub.cls' version 3.21 (2022/01/11),
 %% it is part of
 %% TUDa-CI -- Corporate Design for TU Darmstadt
 %% ----------------------------------------------------------------------------
@@ -26,8 +26,8 @@
 %%
 %% ============================================================================
 %%
-\def\fileversion{3.20}
-\def\filedate{2021/10/12}
+\def\fileversion{3.21}
+\def\filedate{2022/01/11}
 \NeedsTeXFormat{LaTeX2e}
 \RequirePackage{expl3}
 \ProvidesExplClass{tudapub}
@@ -381,7 +381,14 @@
 	\savegeometry{TUDa-marginpar}
 
 	\bool_if:NTF \g_ptxcd_custommargins_bool {
-		\AtBeginDocument{\savegeometry{TUDa-default}}
+		\AtBeginDocument{
+			\savegeometry{TUDa-default}
+			\bool_if:NTF  \g_ptxcd_marginpar_bool {
+				\dim_gset:Nn \g_ptxcd_headwidth_dim {\textwidth+\marginparwidth+\marginparsep}
+			}{
+				\dim_gset:Nn \g_ptxcd_headwidth_dim {\textwidth}
+			}
+		}
 		\tl_const:Nn \c_ptxcd_default_geometry_tl {TUDa-default}
 	}{
 		\bool_if:NTF  \g_ptxcd_marginpar_bool {
@@ -835,50 +842,31 @@
 	You~should~prefer~using~lualatex.
 	}
 	%only apply the hack if pdfx is older than the working version
-	\@ifpackagelater{pdfx}{2021/07/06}{
-		\PassOptionsToPackage{a-2b}{pdfx}
-		\RequirePackage{pdfx}
-	} {
-		\msg_new:nnnn{tudapub} {dirty-hack-pdfa} {
-			I~have~to~use~a~dirty~hack~to~workaround~some~incompatibilites~between~your~LaTeX~version~and~the~pdfa-mode.\\
-			Please~use~pdfa=true~only~if~you~really~need~it.\\
-			We~will~remove~this~hack~as~soon~as~all~incompatibilities~have~been~patched.
-		} {
-			See~the~corresponding~GitHub~Issue~for~more~information:~https://github.com/tudace/tuda_latex_templates/issues/321
-		}
-		\msg_warning:nn {tudapub} {dirty-hack-pdfa}
-		%check if \par is expanable and add a dirty hack
-		%Thanks to Ross Moore for the support
-		\expandafter\ifx\csname tex_par:D\endcsname \relax
-			\let\pdfx@par\par
-		\else
-			\expandafter\let\expandafter\pdfx@par\csname tex_par:D\endcsname
-		\fi
-		\let\orig@par\par
-		\let\par\pdfx@par
-		\PassOptionsToPackage{a-2b}{pdfx}
-		\RequirePackage{pdfx}
-		%restore\par
-		\let\par\orig@par
-	}
+	\PassOptionsToPackage{a-2b}{pdfx}
+	\RequirePackage{pdfx}
+
+	\msg_new:nnnn{tudapub} {outdated-package-pdfa} {
+		Your~Version~of~the~#1-package~is~too~old~to~support~all~methods~required~by~tudapubs~pdfa-mode.\\
+		Either~update~your~TeX-distribution~or~switch~to~pdfa=false.
+	}{See~DEMO-tudapub~for~further~information.}
+
 
 	\sys_if_engine_pdftex:T {
 		\msg_warning:nnn{tudapub} {prefer-lualatex} {PDFTeX}
 	}
 
-	\sys_if_engine_pdftex:T {
+	\sys_if_engine_xetex:T {
 		\msg_warning:nnn{tudapub} {prefer-lualatex} {XeTeX}
 	}
 
-
+	\@ifpackagelater{xmpincl}{2021/09/22}{
+	}{
+		\msg_error:nn{tudapub}  {outdated-package-pdfa} {xmpincl}
+	}
 
 	\@ifpackagelater{pdfx}{2018/12/01}{
 	}{
-		\msg_new:nnnn{tudapub} {outdated-pdfx} {
-			Your~Version~of~the~PDFx-package~is~too~old~to~support~all~methods~required~by~tudapubs~pdfa-mode.\\
-			Either~update~your~TeX-distribution~or~switch~to~pdfa=false.
-		}{See~DEMO-tudapub~for~further~information.}
-		\msg_error:nn{tudapub} {outdated-pdfx}
+		\msg_error:nn{tudapub}  {outdated-package-pdfa} {pdfx}
 	}
 
 
-- 
cgit v1.2.3

