From fc2c3458c9a8ac0c91d5f8410df63adafcf78cbf Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Thu, 18 Jun 2020 21:10:20 +0000
Subject: tudscr (18jun20)

git-svn-id: svn://tug.org/texlive/trunk@55588 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/tudscr/tudscrbook.cls | 175 +++++++++++++++-------
 1 file changed, 124 insertions(+), 51 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/tudscr/tudscrbook.cls')

diff --git a/Master/texmf-dist/tex/latex/tudscr/tudscrbook.cls b/Master/texmf-dist/tex/latex/tudscr/tudscrbook.cls
index 57e9282f9a6..1e0c8838f03 100644
--- a/Master/texmf-dist/tex/latex/tudscr/tudscrbook.cls
+++ b/Master/texmf-dist/tex/latex/tudscr/tudscrbook.cls
@@ -30,7 +30,7 @@
 %% 
 %% TUD-Script -- Corporate Design of Technische Universitaet Dresden
 %% 
-%%   2020/01/14 v2.06f TUD-Script
+%%   2020/06/18 v2.06g TUD-Script
 %% 
 %% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2020
 %% 
@@ -73,13 +73,13 @@
       \fi%
     }
   \fi
-  \TUD@Version@Check{2020/01/14 v2.06f TUD-Script}
+  \TUD@Version@Check{2020/06/18 v2.06g TUD-Script}
 \endgroup
 \NeedsTeXFormat{LaTeX2e}[2019/10/01]
 \providecommand*\tudscrmail{hanisch.latex@outlook.com}
 \newcommand*\TUD@ProvidesClass[3]{%
   \ProvidesClass{#1}[%
-  2020/01/14 v2.06f TUD-Script
+  2020/06/18 v2.06g TUD-Script
     #3 (#2)%
   ]%
   \newcommand*\TUD@Class@KOMA{#2}%
@@ -488,11 +488,11 @@
       \tud@locked@num@set{tud@cdgeometry@num}{1}%
     \fi%
     \if@atdocument%
-      \if@tud@cdgeometry@reset\else%
+      \if@tud@cdgeometry@reset\else% false
         \ifcase\tud@cdgeometry@num\relax%
           \tud@loadgeometry{current@typearea}%
           \@tud@x@geometry@fixmarginstrue%
-        \or%
+        \or% custom
           \tud@loadgeometry{current@custom}%
           \@tud@x@geometry@fixmarginstrue%
         \fi%
@@ -1250,6 +1250,7 @@
 \csdef{tud@v@2.06d}{4}
 \csdef{tud@v@2.06e}{4}
 \csdef{tud@v@2.06f}{4}
+\csdef{tud@v@2.06g}{4}
 \csdef{tud@v@last}{4}
 \newcommand*\tud@v@get[2]{%
   \begingroup%
@@ -1838,6 +1839,7 @@
     \renewcommand*\seriesdefault{\mddefault}%
     \renewcommand*\shapedefault{\updefault}%
     \tud@cdfont@set%
+    \tud@cdfont@symbols@set%
     \tud@ttfont@set%
     \if@tud@x@mweights@enabled%
       \edef\bfseries@rm{\tud@cdfont@bf}%
@@ -1874,6 +1876,7 @@
       \tud@cs@restore{sffamily}%
       \tud@cs@restore{ttfamily}%
     \fi%
+    \tud@cdfont@symbols@reset%
   \fi%
   \if@tud@x@mweights@enabled%
     \edef\rmdef@ult{\rmdefault}%
@@ -1951,6 +1954,46 @@
     \fi%
   }%
 \fi
+\newcommand*\tud@cdfont@symb@list{}
+\newcommand*\tud@cdfont@declare@symb[4]{%
+  \listeadd\tud@cdfont@symb@list{#1}%
+  \tud@DeclareTextSymbol{#1}{#2}{#3}{#4}%
+}
+\newcommand*\tud@DeclareTextSymbol[4]{%
+  \begingroup%
+    \edef\tud@res@a{%
+      \endgroup%
+      \noexpand\DeclareTextCommand%
+        {\csname tud@cdfont@symbol@#1\endcsname}{#2}%
+        {\unexpanded{{\fontfamily{#3}\selectfont\char#4}}}%
+      \noexpand\DeclareTextCommandDefault%
+        {\csname tud@cdfont@symbol@#1\endcsname}%
+        {\noexpand\UseTextSymbol{#2}{\csname tud@cdfont@symbol@#1\endcsname}}%
+    }%
+  \tud@res@a%
+  \expandafter\robustify\csname tud@cdfont@symbol@#1\endcsname%
+}
+\newtoks\tud@cdfont@symbols@toks
+\newcommand*\tud@cdfont@symbols@set{%
+  \expandafter\IfArgIsEmpty\expandafter{\the\tud@cdfont@symbols@toks}{%
+    \forlistloop\tud@cdfont@symbols@set@cmd\tud@cdfont@symb@list%
+    \addto@hook\tud@cdfont@symbols@toks{\tud@cdfont@symbols@toks{}}%
+  }{}%
+}
+\newcommand*\tud@cdfont@symbols@set@cmd[1]{%
+  \tud@cs@store{#1}%
+  \addto@hook\tud@cdfont@symbols@toks{\tud@cs@restore{#1}}%
+  \tud@cs@letltx{#1}{tud@cdfont@symbol@#1}%
+}
+\newcommand*\tud@cdfont@symbols@reset{\the\tud@cdfont@symbols@toks}
+\newcommand*\tud@cdfont@declare@textsymb{%
+  \tud@cdfont@declare@symb{textleftarrow}{TS1}{iwona}{24}%
+  \tud@cdfont@declare@symb{textrightarrow}{TS1}{iwona}{25}%
+  \tud@cdfont@declare@symb{textuparrow}{TS1}{iwona}{94}%
+  \tud@cdfont@declare@symb{textdownarrow}{TS1}{iwona}{95}%
+  \tud@cdfont@declare@symb{textlangle}{TS1}{iwona}{60}%
+  \tud@cdfont@declare@symb{textrangle}{TS1}{iwona}{62}%
+}
 \newcommand*\tud@font@skip@set{%
   \if@tud@relspacing%
     \tud@skip@store{smallskipamount}%
@@ -2018,17 +2061,7 @@
             {OMS/iwona/\tud@res@a/n}%
         }%
       }{}%
-      \AtBeginDocument{%
-        \ifcsundef{textrightarrow}{}{%
-          \tud@cs@store{textrightarrow}%
-          \renewrobustcmd*{\textrightarrow}{%
-            \begingroup%
-              \if@tud@cdfont@active\fontfamily{iwona}\selectfont\fi%
-              \tud@cs@use{textrightarrow}%
-            \endgroup%
-          }%
-        }%
-      }%
+      \tud@cdfont@declare@textsymb%
     \fi%
     \newrobustcmd*\cdfontln{\usefont{\encodingdefault}{\tud@cdfont@fam}{l}{n}}
     \newrobustcmd*\cdfontrn{\usefont{\encodingdefault}{\tud@cdfont@fam}{m}{n}}
@@ -3762,7 +3795,7 @@
 \tud@localization@german{\confirmationname}{Selbstst\"andigkeitserkl\"arung}%
 \tud@localization@german{\confirmationtext}{%
   Hiermit versichere ich, dass ich die vorliegende Arbeit
-  \ifx\@@title\@empty\else mit dem Titel \emph{\@@title} \fi
+  \ifx\@@title\@empty\else{} mit dem Titel \emph{\@@title} \fi
   selbstst\"andig und ohne unzul\"assige Hilfe Dritter verfasst habe.
   Es wurden keine anderen als die in der Arbeit angegebenen Hilfsmittel
   und Quellen benutzt. Die w\"ortlichen und sinngem\"a\ss{}
@@ -3783,7 +3816,7 @@
 \tud@localization@german{\blockingname}{Sperrvermerk}%
 \tud@localization@german{\blockingtext}{%
   Diese Arbeit
-  \ifx\@@title\@empty\else mit dem Titel \emph{\@@title} \fi
+  \ifx\@@title\@empty\else{} mit dem Titel \emph{\@@title} \fi
   enth\"alt vertrauliche Informationen\ifx\@company\@empty\else
   , offengelegt durch \emph{\@company}\fi. Ver\"offentlichungen,
   Vervielf\"altigungen und Einsichtnahme~-- auch nur auszugsweise~--
@@ -3870,8 +3903,8 @@
 \tud@localization@english{\confirmationname}{Statement of authorship}%
 \tud@localization@english{\confirmationtext}{%
   I hereby certify that I have authored this
-  \ifx\@@thesis\@empty thesis\else\@@thesis{} \fi
-  \ifx\@@title\@empty\else entitled \emph{\@@title} \fi
+  \ifx\@@thesis\@empty thesis \else\@@thesis{} \fi
+  \ifx\@@title\@empty\else{} entitled \emph{\@@title} \fi
   independently and without undue assistance from third
   parties. No other than the resources and references
   indicated in this thesis have been used. I have marked
@@ -3892,7 +3925,7 @@
 \tud@localization@english{\blockingname}{Restriction note}%
 \tud@localization@english{\blockingtext}{%
   This \ifx\@@thesis\@empty thesis \else\@@thesis{} \fi
-  \ifx\@@title\@empty\else entitled \emph{\@@title} \fi
+  \ifx\@@title\@empty\else{} entitled \emph{\@@title} \fi
   contains confidential data\ifx\@company\@empty\else
   , disclosed by \emph{\@company}\fi. Publications, duplications
   and inspections---even in part---are prohibited without explicit
@@ -3969,14 +4002,6 @@
 \newlength\tud@len@layoutheight
 \newlength\tud@len@layouthoffset
 \newlength\tud@len@layoutvoffset
-\newcommand*\tud@cdgeometry@assignlayout{%
-  \ifdim\tud@len@layoutwidth<\p@\relax%
-    \setlength\tud@len@layoutwidth{\paperwidth}%
-  \fi%
-  \ifdim\tud@len@layoutheight<\p@\relax%
-    \setlength\tud@len@layoutheight{\paperheight}%
-  \fi%
-}
 \newcommand*\tud@cdgeometry@set{%
   \tud@cdgeometry@assignlayout%
   \tud@if@v@lower{2.05}{%
@@ -4135,6 +4160,35 @@
     \setlength\tud@len@headsep{\dimexpr.707107\tud@len@headsep\relax}%
     \setlength\tud@len@footsep{\dimexpr.707107\tud@len@footsep\relax}%
   \fi%
+  \tud@cdgeometry@papersize@store%
+}
+\newcommand*\tud@cdgeometry@assignlayout{%
+  \ifdim\tud@len@layoutwidth<\p@\relax%
+    \setlength\tud@len@layoutwidth{\paperwidth}%
+  \fi%
+  \ifdim\tud@len@layoutheight<\p@\relax%
+    \setlength\tud@len@layoutheight{\paperheight}%
+  \fi%
+}
+\newcommand*\tud@cdgeometry@papersize@last{}
+\newcommand*\tud@cdgeometry@papersize@store{%
+  \edef\tud@cdgeometry@papersize@last{\the\paperheight:\the\paperwidth}%
+}
+\newcommand*\tud@cdgeometry@resetlayout{%
+  \begingroup%
+    \edef\tud@res@a{\the\paperheight:\the\paperwidth}%
+    \def\tud@res@b{%
+      \endgroup%
+      \tud@cdgeometry@papersize@store%
+    }%
+    \ifx\tud@res@a\tud@cdgeometry@papersize@last\else%
+      \appto\tud@res@b{%
+        \setlength\tud@len@layoutwidth{\z@}%
+        \setlength\tud@len@layoutheight{\z@}%
+        \tud@x@geometry@fixmargins%
+      }%
+    \fi%
+  \tud@res@b%
 }
 \newcommand*\tud@cdgeometry@process{%
   \tud@cdgeometry@@process%
@@ -4315,7 +4369,11 @@
     \if@tud@x@geometry@enabled%
       \if@atdocument%
         \@tud@x@geometry@fixmarginstrue%
-        \tud@cdgeometry@reset{custom}%
+        \ifcase\tud@cdgeometry@num\relax% false
+          \tud@cdgeometry@reset{typearea}%
+        \or% custom
+          \tud@cdgeometry@reset{custom}%
+        \fi%
         \tud@cdgeometry@process%
       \fi%
     \fi%
@@ -4338,9 +4396,12 @@
     \let\tud@x@geometry@layout\@empty%
     \let\tud@x@geometry@parameter\@empty%
     \TUD@parameter@set{geometry}{#1}%
+    \tud@x@geometry@area@set{paper}%
+    \tud@cdgeometry@resetlayout%
     \ifx\tud@x@geometry@layout\@empty\else%
       \begingroup%
         \tud@x@geometry@area@set{layout}%
+        \tud@cdgeometry@assignlayout%
         \edef\tud@res@a{%
           \endgroup%
             \noexpand\setlength\noexpand\tud@len@layoutwidth{\the\paperwidth}%
@@ -4348,17 +4409,25 @@
         }%
       \tud@res@a%
     \fi%
-    \tud@x@geometry@area@set{paper}%
     \ifstr{#2}{newgeometry}{%
       \eappto\Gm@restore@org{%
         \noexpand\paperwidth=\the\paperwidth\relax%
         \noexpand\paperheight=\the\paperheight\relax%
       }%
-      \tud@x@geometry@getlayout{\tud@res@a}%
-      \epreto\tud@x@geometry@parameter{\tud@res@a,}%
-      \def\tud@res@a{\tud@cs@use{newgeometry}}%
-      \expandafter\tud@res@a\expandafter{\tud@x@geometry@parameter}%
-      \edef\tud@x@geometry@init{\tud@x@geometry@parameter}%
+      \ifcase\tud@cdgeometry@num\relax%
+        \typearea[current]{current}%
+        \ifx\tud@x@geometry@parameter\@empty\else%
+          \ClassWarning{\TUD@Class@Name}{%
+            It isn't possible to use \string\newgeometry with any\MessageBreak%
+            key except `paper' or `layout' when package `typearea'\MessageBreak%
+            is used with`cdgeometry=typearea'%
+          }%
+        \fi%
+      \else%
+        \def\tud@res@a{\tud@cs@use{newgeometry}}%
+        \expandafter\tud@res@a\expandafter{\tud@x@geometry@parameter}%
+        \edef\tud@x@geometry@init{\tud@x@geometry@parameter}%
+      \fi%
     }{%
       \eappto\tud@x@geometry@init{\tud@x@geometry@parameter}%
     }%
@@ -4403,8 +4472,12 @@
       }%
       \@tempa#1,,\@nil%
     }%
-    \TUD@parameter@def{layoutwidth}{\setlength\tud@len@layoutwidth{#1}}%
-    \TUD@parameter@def{layoutheight}{\setlength\tud@len@layoutheight{#1}}%
+    \TUD@parameter@def{layoutwidth}{%
+      \tud@x@geometry@area@def{layout}{#1:\tud@len@layoutheight}%
+    }%
+    \TUD@parameter@def{layoutheight}{%
+      \tud@x@geometry@area@def{layout}{\tud@len@layoutwidth:#1}%
+    }%
     \TUD@parameter@def{layoutoffset}{%
       \def\@tempa##1,##2,##3\@nil{%
         \IfArgIsEmpty{##2}{%
@@ -4499,18 +4572,12 @@
     \letcs{\@tempa}{tud@x@geometry@#1}%
     \ifdefvoid{\@tempa}{}{%
       \def\@tempb##1:##2:##3\@nil{%
-        \begingroup%
-          \IfArgIsEmpty{##2}{%
-            \def\@tempb{\KOMAoption{paper}{##1}}%
-          }{%
-            \if@landscape%
-              \def\@tempb{\KOMAoption{paper}{##2:##1}}%
-            \else%
-              \def\@tempb{\KOMAoption{paper}{##1:##2}}%
-            \fi%
-          }%
-          \edef\@tempb{\endgroup\expandonce\@tempb}%
-        \@tempb%
+        \IfArgIsEmpty{##2}{%
+          \KOMAoption{paper}{##1}%
+        }{%
+          \ifstr{#1}{layout}{\let\scr@setpaperorientation\relax}{}%
+          \KOMAoption{paper}{##1:##2}%
+        }%
       }%
       \def\@tempc##1{\@tempb##1::\@nil}%
       \expandafter\forcsvlist\expandafter\@tempc\expandafter{\@tempa}%
@@ -4520,8 +4587,8 @@
     \ifGm@pass%
       \let#1\@empty%
     \else%
-      \tud@cdgeometry@assignlayout%
       \begingroup%
+        \tud@cdgeometry@assignlayout%
         \@tud@res@swafalse%
         \ifdim\tud@len@layoutwidth=\paperwidth\relax\else\@tud@res@swatrue\fi%
         \ifdim\tud@len@layoutheight=\paperheight\relax\else\@tud@res@swatrue\fi%
@@ -5007,6 +5074,7 @@
   }
 }
 \newcommand*\tud@x@typearea@before{%
+  \tud@cdgeometry@resetlayout%
   \tud@skip@store{paperheight}%
   \tud@skip@store{paperwidth}%
   \begingroup%
@@ -5053,9 +5121,14 @@
   \begingroup
     \tud@x@geometry@fixmargins%
     \tud@cs@use{storeareas}{#1}%
+    \def\tud@res@b##1{\unexpanded{\setlength##1}{\the##1}}%
     \edef\tud@res@a{%
       \endgroup%
       \etex@unexpanded{\def#1}{%
+        \tud@res@b{\tud@len@layoutwidth}%
+        \tud@res@b{\tud@len@layoutheight}%
+        \tud@res@b{\tud@len@layouthoffset}%
+        \tud@res@b{\tud@len@layoutvoffset}%
         \expandonce#1%
         \def\noexpand\tud@cdgeometry@num{\tud@cdgeometry@num}%
       }%
-- 
cgit v1.2.3

