kfuletter/kfu-math.lco

135 lines
4.1 KiB
Text
Raw Normal View History

2021-04-12 14:10:20 +02:00
%% kfu-math.lco
%% author: christian clason (c.clason@uni-graz.at)
%
% scrlttr2 (KOMAscript) template for University of Graz
% implements layout according to corporate design of 2017
2023-06-15 09:35:17 +02:00
% and provides defaults for Department of Mathematics and Scientific Computing
2021-04-12 14:10:20 +02:00
2022-03-05 15:33:27 +01:00
\ProvidesFile{kfu-math.lco}[2022-03-05 letter class option 'KFU Mathematik']
2021-04-12 14:10:20 +02:00
\RequirePackage{calc}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
family = kfu,
prefix = kfu@
}
\DeclareBoolOption{print}
\ProcessKeyvalOptions*
\RequirePackage{babel}
2021-04-12 14:10:20 +02:00
\RequirePackage{csquotes}
\RequirePackage{fontspec}
2022-03-05 15:33:27 +01:00
\setsansfont[Ligatures=TeX, ExternalLocation, Path=fonts/,
UprightFont=*Light,
ItalicFont=*LightItalic,
BoldFont=*ExtraBold,
BoldItalicFont=*ExtraBoldItalic]{NunitoSans-}
\usepackage{unicode-math}
\setmathfont[Scale=0.9, ExternalLocation, Path=fonts/]{FiraMath-SemiLight}
\renewcommand{\familydefault}{\sfdefault}
2022-03-01 16:10:00 +01:00
\frenchspacing
2021-04-12 14:10:20 +02:00
\RequirePackage{microtype}
\KOMAoptions{paper=a4, parskip=half-, enlargefirstpage=on, subject=left}
2022-03-05 15:33:27 +01:00
\usepackage[left=20mm,right=20mm,bottom=51.2mm]{geometry}
2024-08-27 17:11:24 +02:00
\setplength{firstheadvpos}{1cm}
\setplength{firstheadhpos}{30mm}
\setplength{firstheadwidth}{170mm}
\setplength{firstfoothpos}{20mm}
\setplength{firstfootvpos}{287mm}
\addtoplength[-5]{firstfootvpos}{\baselineskip}
\setplength{refhpos}{30mm}
\setplength{refwidth}{170mm}
\setplength{sigbeforevskip}{3\baselineskip}
2021-04-12 14:10:20 +02:00
\let\raggedsignature=\raggedright
\ifkfu@print
\KOMAoptions{foldmarks=true}
\else
\KOMAoptions{foldmarks=off}
\KOMAoptions{backaddress=off}
\fi
\RequirePackage{xcolor}
\definecolor{kfu@gray}{gray}{0.5}
\RequirePackage{graphicx}
2022-03-05 15:33:27 +01:00
\RequirePackage[colorlinks=true,linkcolor=black,urlcolor=black]{hyperref}
\urlstyle{sf}
2021-04-12 14:10:20 +02:00
\newkomavar{myinstitute}
\newkomavar{myuniversity}
\newkomavar{fromtitle}
\newkomavar{emaildomain}
2023-06-15 09:35:17 +02:00
\providecaptionname{english}\myinstitute{Department of Mathematics and Scientific Computing}
2021-04-12 14:10:20 +02:00
\providecaptionname{ngerman}\myinstitute{Institut für Mathematik und Wissenschaftliches Rechnen}
2022-03-05 15:33:27 +01:00
\providecaptionname{english}\myuniversity{University of Graz}
\providecaptionname{ngerman}\myuniversity{Universität Graz}
2021-04-12 14:10:20 +02:00
\setkomavar{myinstitute}{\myinstitute}
\setkomavar{myuniversity}{\myuniversity}
\setkomavar{emaildomain}{@uni-graz.at}
2022-03-05 15:33:27 +01:00
\setkomavar{phoneseparator}{+43~(0)316\,/\,380-}
2021-04-12 14:10:20 +02:00
\providecaptionname{english}\myaddress{Heinrichstrasse 36, 8010 Graz, Austria}
\providecaptionname{ngerman}\myaddress{Heinrichstrasse 36, 8010 Graz}
\setkomavar{fromaddress}{\myaddress}
\setkomavar{backaddressseparator}{~\raisebox{0.25ex}{\textbf{\large.}}~}
2022-03-05 15:33:27 +01:00
\setkomavar{fromfax}{\usekomavar[\faxname]{faxseparator}+43~(0)316\,/\,380-9815}
2021-04-12 14:10:20 +02:00
\setkomavar{place}{Graz}
\setkomavar{signature}{\usekomavar{fromtitle}~\usekomavar{fromname}}
2022-03-05 15:33:27 +01:00
\renewcommand{\ps}{\footnotesize\itshape \bigskip}
\iflanguage{ngerman}{%
\renewcaptionname{ngerman}{\enclname}{Beilage}
}{}
2022-03-05 15:33:27 +01:00
2021-04-12 14:10:20 +02:00
\setkomavar{firsthead}{%
\raggedleft
2022-03-05 15:33:27 +01:00
\parbox[c]{8.5cm}{\raggedleft%
\includegraphics[height=2.5cm,keepaspectratio=true]{kfulogo_claim.pdf}
2021-04-12 14:10:20 +02:00
}
}
2022-03-05 15:33:27 +01:00
\setkomavar{firstfoot}{\scriptsize\raggedleft%
\textbf{\myuniversity}\\
\textbf{\myinstitute}\\[1ex]
2021-04-12 14:10:20 +02:00
\usekomavar{fromtitle}~\usekomavar{fromname}\\
\usekomavar{fromaddress}\\
2022-03-05 15:33:27 +01:00
\usekomavar{phoneseparator}\usekomavar{fromphone}~|~%
\usekomavar{fromemail}\usekomavar{emaildomain}\\
2021-04-12 14:10:20 +02:00
\pageofpages\hfill
\usekomavar[\url]{fromurl}
}
\RequirePackage{scrlayer-scrpage}
\RequirePackage{lastpage}
\newcommand{\pageofpages}{%
\@ifundefined{pageof@\languagename}
{page~\thepage~of~\pageref{LastPage}} % a default
{\@nameuse{pageof@\languagename}}%
}
\newcommand{\pageof@ngerman}{Seite~\thepage~von~\pageref{LastPage}}
\DeclareNewLayer[foreground,foot,
2022-03-05 15:33:27 +01:00
contents={
\scriptsize\raggedleft
\textbf{\myuniversity}\\
\textbf{\myinstitute}\\[1ex]
\usekomavar{fromtitle}~\usekomavar{fromname}\\
\usekomavar{fromaddress}\\
\usekomavar{phoneseparator}\usekomavar{fromphone}~|~%
\usekomavar{fromemail}\usekomavar{emaildomain}\\
\pageofpages\hfill
\usekomavar[\url]{fromurl}
2021-04-12 14:10:20 +02:00
2022-03-05 15:33:27 +01:00
}
]{KFUletter.left}
\DeclarePageStyleByLayers{kfuletter}{KFUletter.left}
\pagestyle{kfuletter}
%TODO(clason): hack around koma-script v3.42 bug
\renewcommand*{\@gen@firsthead}{}