%%
%% This is file `fix-tudscrfonts.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% tudscr-version.dtx  (with options: `package,fontsfix')
%% tudscr-comp.dtx  (with options: `package,fontsfix,identify')
%% tudscr-base.dtx  (with options: `package,fontsfix')
%% tudscr-comp.dtx  (with options: `package,fontsfix,option')
%% tudscr-comp.dtx  (with options: `package,fontsfix,body')
%% 
%% TUD-Script -- Corporate Design of Technische Universitaet Dresden
%% 
%%   2017/05/30 v2.05m TUD-Script
%% 
%% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2017
%% 
%% This file was generated from file(s) of the TUD-Script bundle.
%% ----------------------------------------------------------------------------
%% 
%% This work may be distributed and/or modified under the conditions
%% of the LaTeX Project Public License, version 1.3c of the license.
%% The latest version of this license is in
%%     http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of
%% LaTeX 2005/12/01 or later and of this work.
%% 
%% This work has the LPPL maintenance status "author-maintained".
%% 
%% The current maintainer and author of this work is Falk Hanisch.
%% 
%%% From File: tudscr-version.dtx
\begingroup
  \catcode`\@11\relax
  \ifx\TUD@Version\@undefined
    \newcommand*\TUD@Version@Check[1]{%
      \gdef\TUD@Version{#1}%
      \gdef\TUDScriptVersion{#1}%
      \def\@tempb##1 v##2 ##3\relax##4\relax{\gdef\TUDScriptVersionNumber{##2}}%
      \edef\@tempa{\TUD@Version}%
      \expandafter\@tempb\@tempa\relax? ? \relax\relax%
      \gdef\TUD@Version@KOMA{3.17}%
    }
  \else
    \newcommand*\TUD@Version@Check[1]{%
      \def\@tempa{#1}%
      \ifx\TUD@Version\@tempa\else%
        \@latex@warning@no@line{%
          \noexpand\TUD@Version\space is `\TUD@Version',\MessageBreak%
          but `#1' was expected!\MessageBreak%
          You should not use classes, packages or files from\MessageBreak%
          different TUD-Script-Bundle versions%
        }%
      \fi%
    }
  \fi
  \TUD@Version@Check{2017/05/30 v2.05m TUD-Script}
\endgroup
\NeedsTeXFormat{LaTeX2e}
\providecommand*\tudscrmail{hanisch.latex@outlook.com}
\@ifundefined{TUDScript}{%
  \DeclareRobustCommand\TUDScript{%
    \ifdin{TUD-SCRIPT}{%
      \textsf{T\kern.05em U\kern.05em D\kern.1em-\kern.1em Script}%
    }\csname xspace\endcsname%
  }%
}{}
%%% From File: tudscr-comp.dtx
\ProvidesPackage{fix-tudscrfonts}[%
  2017/05/30 v2.05m TUD-Script
  package for font fixes
  (compatibility for old tud(scr) classes)%
]
%%% From File: tudscr-base.dtx
\RequirePackage{scrlfile}[2013/12/19]
\RequirePackage{etoolbox}[2011/01/03]
\newcommand*\tud@cmd@store[1]{%
  \tud@cmd@check{#1}%
  \ifcsdef{@@tud@#1}{}{\csletcs{@@tud@#1}{#1}}%
}
\newcommand*\tud@cmd@check[1]{%
  \ifcsdef{#1}{}{%
    \PackageError{%
      fix-tudscrfonts%
    }{`\@backslashchar#1' is not defined}{%
      The command `\@backslashchar#1' was never defined\MessageBreak%
      Please contact the TUD-Script maintainer\MessageBreak%
      via \tudscrmail. A bugfix is urgently required.%
    }%
  }%
}
\BeforePackage{tudscrbase}{%
  \undef\tud@cmd@store%
  \undef\tud@cmd@check%
}
%%% From File: tudscr-comp.dtx
\PassOptionsToPackage{relspacing=false,cdfont=ultrabold}{tudscrfonts}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{tudscrfonts}}
\ProcessOptions\relax
\AtEndPreamble{%
  \tud@fontsfix@maybe@err%
  \RequirePackage{tudscrfonts}[\TUD@Version]%
}
\ifx\usepackage\RequirePackage
  \newcommand*\tud@fontsfix@maybe@err{%
    \PackageError{fix-tudscrfonts}{Package too late}{%
      You must load `fix-tudscrfonts' with\MessageBreak%
      `\string\RequirePackage' before any document class.%
    }%
  }%
\else
  \newcommand*\tud@fontsfix@maybe@err{%
    \PackageError{fix-tudscrfonts}{Unsupported class found}{%
      You have to use `fix-tudscrfonts' only\MessageBreak%
      with supported classes. These are: `tudbook',\MessageBreak%
      `tudbeamer', `tudfax', `tudform', `tudhaus',\MessageBreak%
      and `tudletter' as well as `tudposter'\MessageBreak%
      and `tudmathposter'. Otherwise it's adequate\MessageBreak%
      to use package `tudscrfonts' as usual.%
    }%
  }%
\fi
%%% From File: tudscr-comp.dtx
\newcommand*\tud@fontsfix@AdaptClass[2]{%
  \BeforeClass{#1}{%
    \let\tud@fontsfix@maybe@err\relax%
    \tud@cmd@store{DeclareFixedFont}%
    \renewcommand*\DeclareFixedFont[6]{}%
    \tud@cmd@store{rmdefault}%
    \tud@cmd@store{sfdefault}%
    \tud@cmd@store{ttdefault}%
    \tud@cmd@store{bfdefault}%
    \tud@cmd@store{mddefault}%
    \tud@cmd@store{itdefault}%
    \tud@cmd@store{sldefault}%
    \tud@cmd@store{scdefault}%
    \tud@cmd@store{updefault}%
    \tud@cmd@store{rmfamily}%
    \tud@cmd@store{sffamily}%
    \tud@cmd@store{ttfamily}%
    \tud@cmd@store{familydefault}%
    \tud@cmd@store{seriesdefault}%
    \tud@cmd@store{shapedefault}%
    \tud@cmd@store{normalfont}%
    \let\normalfont\relax%
    \PassOptionsToClass{serifmath}{#1}%
  }%
  \AfterClass{#1}{%
    \RequirePackage{tudscrbase}[\TUD@Version]%
    \tud@cmd@restore{DeclareFixedFont}%
    \tud@cmd@restore{rmdefault}%
    \tud@cmd@restore{sfdefault}%
    \tud@cmd@restore{ttdefault}%
    \tud@cmd@restore{bfdefault}%
    \tud@cmd@restore{mddefault}%
    \tud@cmd@restore{itdefault}%
    \tud@cmd@restore{sldefault}%
    \tud@cmd@restore{scdefault}%
    \tud@cmd@restore{updefault}%
    \tud@cmd@restore{rmfamily}%
    \tud@cmd@restore{sffamily}%
    \tud@cmd@restore{ttfamily}%
    \tud@cmd@restore{familydefault}%
    \tud@cmd@restore{seriesdefault}%
    \tud@cmd@restore{shapedefault}%
    \tud@cmd@restore{normalfont}%
    #2%
    \AfterPackage*{tudscrfonts}{%
      \def\dinBold{\dinbn}%
      \def\dinfamily{\dinbn}%
      \AtBeginDocument{%
        \newcommand*\univLightVII{}%
        \newcommand*\univLightObliqueVII{}%
        \newcommand*\univBoldVII{}%
        \newcommand*\univLightIX{}%
        \newcommand*\univLightObliqueIX{}%
        \newcommand*\univBoldIX{}%
        \newcommand*\univLightXI{}%
        \newcommand*\univLightObliqueXI{}%
        \newcommand*\univBoldXI{}%
        \newcommand*\univLightXV{}%
        \newcommand*\univLightObliqueXV{}%
        \newcommand*\univBoldXV{}%
        \newcommand*\univLightHead{}%
        \newcommand*\univBoldHead{}%
        \providecommand*\tud@head@fntsz{9}%
        \if@tud@univers%
          \if@tud@x@fontspec@enabled%
            \DeclareFixedFont{\univLightVII}{\encodingdefault}%
              {UniversLight}{m}{n}{7}%
            \DeclareFixedFont{\univLightObliqueVII}{\encodingdefault}%
              {UniversLightOblique}{m}{n}{7}%
            \DeclareFixedFont{\univBoldVII}{\encodingdefault}%
              {UniversBold}{m}{n}{7}%
            \DeclareFixedFont{\univLightIX}{\encodingdefault}%
              {UniversLight}{m}{n}{9}%
            \DeclareFixedFont{\univLightObliqueIX}{\encodingdefault}%
              {UniversLightOblique}{m}{n}{9}%
            \DeclareFixedFont{\univBoldIX}{\encodingdefault}%
              {UniversBold}{m}{n}{9}%
            \DeclareFixedFont{\univLightXI}{\encodingdefault}%
              {UniversLight}{m}{n}{11}%
            \DeclareFixedFont{\univLightObliqueXI}{\encodingdefault}%
              {UniversLightOblique}{m}{n}{11}%
            \DeclareFixedFont{\univBoldXI}{\encodingdefault}%
              {UniversBold}{m}{n}{11}%
            \DeclareFixedFont{\univLightXV}{\encodingdefault}%
              {UniversLight}{m}{n}{15}%
            \DeclareFixedFont{\univLightObliqueXV}{\encodingdefault}%
              {UniversLightOblique}{m}{n}{15}%
            \DeclareFixedFont{\univBoldXV}{\encodingdefault}%
              {UniversBold}{m}{n}{15}%
            \DeclareFixedFont{\univLightHead}{\encodingdefault}%
              {UniversLight}{m}{n}{\tud@head@fntsz}%
            \DeclareFixedFont{\univBoldHead}{\encodingdefault}%
              {UniversBold}{m}{n}{\tud@head@fntsz}%
          \else%
            \DeclareFixedFont{\univLightVII}{\encodingdefault}%
              {\tud@univers}{l}{n}{7}%
            \DeclareFixedFont{\univLightObliqueVII}{\encodingdefault}%
              {\tud@univers}{l}{sl}{7}%
            \DeclareFixedFont{\univBoldVII}{\encodingdefault}%
              {\tud@univers}{b}{n}{7}%
            \DeclareFixedFont{\univLightIX}{\encodingdefault}%
              {\tud@univers}{l}{n}{9}%
            \DeclareFixedFont{\univLightObliqueIX}{\encodingdefault}%
              {\tud@univers}{l}{sl}{9}%
            \DeclareFixedFont{\univBoldIX}{\encodingdefault}%
              {\tud@univers}{b}{n}{9}%
            \DeclareFixedFont{\univLightXI}{\encodingdefault}%
              {\tud@univers}{l}{n}{11}%
            \DeclareFixedFont{\univLightObliqueXI}{\encodingdefault}%
              {\tud@univers}{l}{sl}{11}%
            \DeclareFixedFont{\univBoldXI}{\encodingdefault}%
              {\tud@univers}{b}{n}{11}%
            \DeclareFixedFont{\univLightXV}{\encodingdefault}%
              {\tud@univers}{l}{n}{15}%
            \DeclareFixedFont{\univLightObliqueXV}{\encodingdefault}%
              {\tud@univers}{l}{sl}{15}%
            \DeclareFixedFont{\univBoldXV}{\encodingdefault}%
              {\tud@univers}{b}{n}{15}%
            \DeclareFixedFont{\univLightHead}{\encodingdefault}%
              {\tud@univers}{l}{n}{\tud@head@fntsz}%
            \DeclareFixedFont{\univBoldHead}{\encodingdefault}%
              {\tud@univers}{b}{n}{\tud@head@fntsz}%
          \fi%
        \else%
          \DeclareFixedFont{\univLightVII}{\encodingdefault}%
            {\sfdefault}{\mddefault}{\updefault}{7}%
          \DeclareFixedFont{\univLightObliqueVII}{\encodingdefault}%
            {\sfdefault}{\mddefault}{\sldefault}{7}%
          \DeclareFixedFont{\univBoldVII}{\encodingdefault}%
            {\sfdefault}{\bfdefault}{\updefault}{7}%
          \DeclareFixedFont{\univLightIX}{\encodingdefault}%
            {\sfdefault}{\mddefault}{\updefault}{9}%
          \DeclareFixedFont{\univLightObliqueIX}{\encodingdefault}%
            {\sfdefault}{\mddefault}{\sldefault}{9}%
          \DeclareFixedFont{\univBoldIX}{\encodingdefault}%
            {\sfdefault}{\bfdefault}{\updefault}{9}%
          \DeclareFixedFont{\univLightXI}{\encodingdefault}%
            {\sfdefault}{\mddefault}{\updefault}{11}%
          \DeclareFixedFont{\univLightObliqueXI}{\encodingdefault}%
            {\sfdefault}{\mddefault}{\sldefault}{11}%
          \DeclareFixedFont{\univBoldXI}{\encodingdefault}%
            {\sfdefault}{\bfdefault}{\updefault}{11}%
          \DeclareFixedFont{\univLightXV}{\encodingdefault}%
            {\sfdefault}{\mddefault}{\updefault}{15}%
          \DeclareFixedFont{\univLightObliqueXV}{\encodingdefault}%
            {\sfdefault}{\mddefault}{\sldefault}{15}%
          \DeclareFixedFont{\univBoldXV}{\encodingdefault}%
            {\sfdefault}{\bfdefault}{\updefault}{15}%
          \DeclareFixedFont{\univLightHead}{\encodingdefault}%
            {\sfdefault}{\mddefault}{\updefault}{\tud@head@fntsz}%
          \DeclareFixedFont{\univBoldHead}{\encodingdefault}%
            {\sfdefault}{\bfdefault}{\updefault}{\tud@head@fntsz}%
        \fi%
      }%
    }%
  }%
}
\tud@fontsfix@AdaptClass{tudletter}{}
\tud@fontsfix@AdaptClass{tudfax}{}
\tud@fontsfix@AdaptClass{tudform}{}
\tud@fontsfix@AdaptClass{tudhaus}{}
\tud@fontsfix@AdaptClass{tudposter}{}
\tud@fontsfix@AdaptClass{tudbeamer}{}
\tud@fontsfix@AdaptClass{tudbook}{%
  \patchcmd{\@makechapterhead}{\dinBold\Huge\bfseries}{%
    \tud@sec@fontface[\bfseries]%
    \if@color\color{HKS41-100}\fi%
    \Huge%
  }{}{\tud@patch@wrn{@makechapterhead}}%
  \patchcmd{\@makechapterhead}{\MakeUppercase}{%
    \tud@makeuppercase%
  }{}{\tud@patch@wrn{@makechapterhead}}%
  \patchcmd{\@makeschapterhead}{\dinBold\Huge\bfseries}{%
    \tud@sec@fontface[\bfseries]%
    \if@color\color{HKS41-100}\fi%
    \Huge%
  }{}{\tud@patch@wrn{@makeschapterhead}}%
  \patchcmd{\@makeschapterhead}{\MakeUppercase}{%
    \tud@makeuppercase%
  }{}{\tud@patch@wrn{@makeschapterhead}}%
  \patchcmd{\section}{\dinBold\Large\bfseries\MakeUppercase}{%
    \tud@sec@fontface[\bfseries]%
    \if@color\color{HKS41-100}\fi%
    \Large%
    \tud@makeuppercase%
  }{}{\tud@patch@wrn{section}}%
  \patchcmd{\showtitle}{\dinBold\Huge\bfseries\MakeUppercase}{%
    \tud@sec@fontface[\bfseries]%
    \if@colortitle\color{HKS41-30}\fi%
    \Huge%
    \tud@makeuppercase%
  }{}{\tud@patch@wrn{showtitle}}%
}
\tud@fontsfix@AdaptClass{tudmathposter}{%
  \def\raggedtitle{\tud@raggedright}%
  \renewcommand*\raggedpart{\tud@raggedright}%
  \renewcommand*\raggedsection{\tud@raggedright}%
  \setkomafont{title}{\tud@sec@fontface[\bfseries]\Huge}%
  \CheckCommand\maketitle{%
    \if@matheanull
    \setlength\@tempskipa{31.194586mm-\topsep}%
    \else
    \setlength\@tempskipa{33.02mm-\topskip}%
    \fi
    \vskip\@tempskipa
   {%
      \ifx\@title\@empty\else
      \usekomafont{title}\preprocesstitle{\@title}%
      \ifx\@subtitle\@empty\else\\\fi
      \fi
    }{
      \ifx\@subtitle\@empty\else
      \subtitlefont\preprocesstitle{\@subtitle}%
      \fi
      \if@matheanull
      \vskip 2.9948cm\relax
      \else
      \vskip 3.17cm\relax
      \fi
    }%
  }%
  \apptocmd{\maketitle}{\vspace{-6ex}}{}{\tud@patch@wrn{maketitle}}%
  \renewcommand*\subtitlefont{%
    \unskip%
    \ifstr{\mddefault}{l}{%
      \tud@sec@fontface[\fontseries{m}]%
    }{%
      \tud@sec@fontface[\fontseries{bx}]%
    }%
    \huge%
  }%
  \renewcommand*\preprocesstitle[1]{\raggedtitle\tud@makeuppercase{#1}}%
  \if@mathevorgabe%
    \undef\sectionfont%
    \undef\subsectionfont%
  \fi%
  \newcommand*\sectionfont{\bfseries\LARGE}%
  \newcommand*\subsectionfont{\sectionfont\large}%
  \patchcmd{\ps@tudposter}{\textbf{\@einrichtung}}{%
    \textbf{\fontseries{b}\selectfont\@einrichtung}%
  }{}{\tud@patch@wrn{ps@tudposter}}%
  \pagestyle{tudposter}%
}
\PreventPackageFromLoading[%
  \RequirePackage{amsmath}%
  \RequirePackage{amsfonts}%
  \let\DeclareTudMathSizes\@gobblefour%
  \newif\if@tudfonts@nodin%
]{tudfonts}
\BeforePackage{tudscrfonts}{%
  \undef\univln%
  \undef\univrn%
  \undef\univbn%
  \undef\univxn%
  \undef\univls%
  \undef\univrs%
  \undef\univbs%
  \undef\univxs%
  \undef\dinbn%
  \undef\textuln%
  \undef\texturn%
  \undef\textubn%
  \undef\textuxn%
  \undef\textuls%
  \undef\texturs%
  \undef\textubs%
  \undef\textuxs%
  \undef\textdbn%
}
\endinput
%%
%% End of file `fix-tudscrfonts.sty'.
