summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/univie-ling/tex/univie-ling-thesis.cls
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/univie-ling/tex/univie-ling-thesis.cls')
-rw-r--r--macros/latex/contrib/univie-ling/tex/univie-ling-thesis.cls135
1 files changed, 92 insertions, 43 deletions
diff --git a/macros/latex/contrib/univie-ling/tex/univie-ling-thesis.cls b/macros/latex/contrib/univie-ling/tex/univie-ling-thesis.cls
index bfe9204471..4fee7f10c8 100644
--- a/macros/latex/contrib/univie-ling/tex/univie-ling-thesis.cls
+++ b/macros/latex/contrib/univie-ling/tex/univie-ling-thesis.cls
@@ -33,7 +33,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}[2022/06/01]
-\ProvidesPackage{univie-ling-thesis}[2024/05/09 v.2.5 Univie Linguistic Theses (JSp)]
+\ProvidesPackage{univie-ling-thesis}[2024/09/20 v.2.8 Univie Linguistic Theses (JSp)]
%% ============================================================
@@ -55,6 +55,7 @@
\newif\if@uvt@psfonts\@uvt@psfontstrue
\newif\if@uvt@refsp\@uvt@refsptrue
\newif\if@uvt@usefontenc\@uvt@usefontenctrue
+\newif\if@uvt@titlepage\@uvt@titlepagetrue
\def\uvt@fontenc{T1}
% Define keys and values
@@ -155,6 +156,10 @@
{ \@uvt@draftmarktrue
\@uvt@draftmarkfptrue
},
+ % titlepage=<true|false>
+ % Output titlepage
+ titlepage.legacy_if_set:n = @uvt@titlepage,
+ titlepage.usage:n = preamble,
% no val equals to true
draftmark .default:n = {true},
% fonts=<ps|otf|none>
@@ -234,38 +239,43 @@ This includes all drawings, sketches, graphics and internet sources.}
\deftranslation[to=English]{selbst3p}{Furthermore, we declare that this paper has not been submitted as an examination already, neither as a whole nor in parts.}
\deftranslation[to=German]{wien}{Wien}
\deftranslation[to=English]{wien}{Vienna}
+\deftranslation[to=German]{urlaccess}{Abruf am:}
+\deftranslation[to=English]{urlaccess}{last accessed:}
%% ============================================================
%% FONTS AND EMPHASIZING:
%% ============================================================
+\def\uvt@titlesans{\sffamily}
+
\if@uvt@psfonts
\RequirePackage[T1]{fontenc}
\if@uvt@usefontenc
\RequirePackage[\uvt@fontenc]{fontenc}
\fi
-
- % Palatino
+ % Serif: Palatino
\RequirePackage[osf]{mathpazo}
-
- % Arial or Helvetica
- \IfFileExists{uarial.sty}{%
- \RequirePackage{uarial}
- }{%
- \RequirePackage{helvet}
- }
-
- % Source Code Pro (Courier)
+ % Sans: Source Sans Pro Light
+ \RequirePackage[semibold]{sourcesanspro}
+ % Mono: Source Code Pro
\RequirePackage[scale=.93]{sourcecodepro}
+ % Lighter Sans for title page
+ \def\uvt@titlesans{\def\mdseries@sf{l}\sffamily}
\fi
\if@uvt@otffonts
\RequirePackage{fontspec}
- \setmainfont{Palatino}
- \setsansfont{Arial}
- \setmonofont{SourceCodePro}
+ \setmainfont{TeX Gyre Pagella}
+ % Sans: Source Sans Pro Light
+ \RequirePackage[semibold]{sourcesanspro}
+ % Mono: Source Code Pro
+ \RequirePackage[scale=.93]{sourcecodepro}
+ % Lighter Sans for title page
+ \def\uvt@titlesans{\sourcesansprolight}
\fi
+
+
% Hyperlinks
\RequirePackage{url}
\newcommand{\urlprefix}{}
@@ -275,18 +285,36 @@ This includes all drawings, sketches, graphics and internet sources.}
{\def\UrlFont{\rmfamily\itshape}
}
+% Format URL dates
+\def\wlg@urldate{}
+\newcommand*\SetURLDate[1]{\gdef\wlg@urldate{#1}}
+\AddToHook{begindocument}{
+ \RequirePackage[english,ngerman]{isodate}
+ \numdate
+ \providecommand*\urldate[1]{[\translate{urlaccess} \printdate{#1}]}
+ % Convenience function
+ \NewDocumentCommand\weblink{mo}{%
+ \url{#1}%
+ \IfNoValueTF{#2}%
+ {\ifx\wlg@urldate\empty\else%
+ \ \urldate{\wlg@urldate}%
+ \fi}%
+ {\ \urldate{#2}}%
+ }
+}
+
% Fix for \slash-Makro, by Donald Arsenau
\def\slash{/\penalty\exhyphenpenalty\hskip\z@skip}
% Font settings
-\newkomafont{thesistype}{\fontsize{24}{26pt}\bfseries\sffamily}
-\setkomafont{title}{\fontsize{18}{20pt}\sffamily}
-\setkomafont{author}{\fontsize{18}{20pt}\large\sffamily}
-\setkomafont{date}{\normalfont\fontsize{11}{13pt}\mdseries\sffamily}
-\newkomafont{degree}{\fontsize{12}{14pt}\sffamily}
-\newkomafont{baende}{\normalfont\fontsize{12}{14pt}\mdseries\sffamily}
-\newkomafont{tpcaption}{\fontsize{11}{13pt}\sffamily}
-\newkomafont{codes}{\fontsize{10}{12pt}\sffamily}
+\newkomafont{thesistype}{\fontsize{24}{26pt}\bfseries\uvt@titlesans}
+\setkomafont{title}{\fontsize{18}{20pt}\uvt@titlesans}
+\setkomafont{author}{\fontsize{18}{20pt}\large\uvt@titlesans}
+\setkomafont{date}{\normalfont\fontsize{11}{13pt}\mdseries\uvt@titlesans}
+\newkomafont{degree}{\fontsize{12}{14pt}\uvt@titlesans}
+\newkomafont{baende}{\normalfont\fontsize{12}{14pt}\mdseries\uvt@titlesans}
+\newkomafont{tpcaption}{\fontsize{11}{13pt}\uvt@titlesans}
+\newkomafont{codes}{\fontsize{10}{12pt}\uvt@titlesans}
%% ============================================================
@@ -364,35 +392,35 @@ This includes all drawings, sketches, graphics and internet sources.}
\def\thesistype@bachelor{Bachelorarbeit}
\def\thesistype@bachelor@en{Bachelor's Thesis}
\def\dirtype@bachelor{Studienrichtung}
-\def\dirtype@bachelor@en{degree programme}
+\def\dirtype@bachelor@en{Degree programme}
\def\degree@bachelor{Bachelor of Arts (BA)}
\def\degree@bachelor@f{\degree@bachelor}
% master
\def\thesistype@master{Masterarbeit}
\def\thesistype@master@en{Master's Thesis}
\def\dirtype@master{Studienrichtung}
-\def\dirtype@master@en{degree programme}
+\def\dirtype@master@en{Degree programme}
\def\degree@master{Master of Arts (MA)}
\def\degree@master@f{\degree@master}
% magister
\def\thesistype@magister{Magisterarbeit}
\def\thesistype@magister@en{Magister Thesis}
\def\dirtype@magister{Studienrichtung}
-\def\dirtype@magister@en{degree programme}
+\def\dirtype@magister@en{Degree programme}
\def\degree@magister{Magister der Philosophie (Mag.\,Phil.)}
\def\degree@magister@f{Magistra der Philosophie (Mag.\,Phil.)}
% diplom
\def\thesistype@diplom{Diplomarbeit}
\def\thesistype@diplom@en{Diploma Thesis}
\def\dirtype@diplom{Studienrichtung}
-\def\dirtype@diplom@en{degree programme}
+\def\dirtype@diplom@en{Degree programme}
\def\degree@diplom{Magister der Philosophie (Mag.\,Phil.)}
\def\degree@diplom@f{Magistra der Philosophie (Mag.\,Phil.)}
% diss
\def\thesistype@diss{Dissertation}
\def\thesistype@diss@en{Doctoral Thesis}
\def\dirtype@diss{Dissertationsgebiet}
-\def\dirtype@diss@en{field of study}
+\def\dirtype@diss@en{Field of study}
\def\degree@diss{Doktor der Philosophie (Dr.\,phil.)}
\def\degree@diss@f{Doktorin der Philosophie (Dr.\,phil.)}
@@ -424,7 +452,7 @@ This includes all drawings, sketches, graphics and internet sources.}
\clearmainofpairofpagestyles
\ihead{\headmark}
\ohead{\pagemark}
-\automark{chapter}
+\automark[section]{chapter}
\KOMAoptions{headsepline=true}
\pagestyle{scrheadings}
@@ -454,7 +482,10 @@ This includes all drawings, sketches, graphics and internet sources.}
% We need graphicx for the logo
\RequirePackage{graphicx}
+\def\uvt@titlesep{\,|\,}
+
\renewcommand*\maketitle[1][1]{%
+ \if@uvt@titlepage
\newgeometry{top=2cm,bottom=2.5cm,left=2.5cm,right=2cm}
\expandafter\ifnum \csname scr@v@3.12\endcsname>\scr@compatibility\relax
\else
@@ -507,27 +538,27 @@ This includes all drawings, sketches, graphics and internet sources.}
\renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}%
\setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative
\begin{flushright}
- \includegraphics[width=6cm]{univielogo-sw}
+ \includegraphics[width=6cm]{univielogo}
\end{flushright}
\vspace{2\baselineskip}
\begin{center}
- {\usekomafont{thesistype}\MakeUppercase{\@thesistype\,/\,\hskip\z@skip\mbox{\@thesistype@en}}\par}
+ {\usekomafont{thesistype}\MakeUppercase{\@thesistype\uvt@titlesep\hskip\z@skip\mbox{\@thesistype@en}}\par}
\end{center}
\vspace{2\baselineskip}
\begin{center}
- {\usekomafont{tpcaption}Titel der \@thesistype\,/\,Title of the \@thesistype@en\par}
+ {\usekomafont{tpcaption}Titel\uvt@titlesep Title\par}
{\ifx\@title\@empty\else
- \usekomafont{title}{\enquote{\@title%
- \ifx\@subtitle\@empty\else\linebreak\@subtitle\fi}\par}%
+ \usekomafont{title}{\@title%
+ \ifx\@subtitle\@empty\else\linebreak\@subtitle\fi\par}%
\fi
}%
{\ifx\@volume\@empty\else%
- \vskip 1em\usekomafont{baende}{Band \@volume\ von \@volumes\ B\"anden\,/\,volume \@volume\ of \@volumes\ volumes}%
+ \vskip 1em\usekomafont{baende}{Band \@volume\ von \@volumes\ B\"anden\uvt@titlesep volume \@volume\ of \@volumes\ volumes}%
\fi%
}%
\vskip 2em
{%
- {\usekomafont{tpcaption}verfasst von\,/\,submitted by\par}
+ {\usekomafont{tpcaption}verfasst von\,\uvt@titlesep\uvt@titlesep submitted by\par}
\usekomafont{author}{%
\lineskip 0.75em%
\begin{tabular}[t]{c}
@@ -536,21 +567,21 @@ This includes all drawings, sketches, graphics and internet sources.}
}%
}%
\vskip 2em
- {\usekomafont{tpcaption}angestrebter akademischer Grad\,/\,in partial fulfilment of the requirements for the degree of\par}
+ {\usekomafont{tpcaption}angestrebter akademischer Grad\uvt@titlesep in partial fulfilment of the requirements for the degree of\par}
\usekomafont{degree}{\@degree}
\end{center}\par
\vfill
- {\usekomafont{date}{Wien, \the\year\,/\,Vienna, \the\year\par}}%
+ {\usekomafont{date}{Wien, \the\year\uvt@titlesep Vienna, \the\year\par}}%
\vskip 2em
\usekomafont{codes}{%
\begin{tabular}[t]{@{}>{\raggedright}p{0.4\columnwidth}>{\raggedright}p{0.1\columnwidth}>{\raggedright}p{0.4\columnwidth}}
- Studienkennzahl lt. Studienblatt/\newline degree programme code as it appears on the student record sheet: & & \@studienkennzahl\tabularnewline
+ Studienkennzahl lt. Studienblatt\uvt@titlesep Degree programme code as it appears on the student record sheet: & & \@studienkennzahl\tabularnewline
\noalign{\vskip6pt}
- \@dirtype\ lt. Studienblatt\slash\newline \@dirtype@en\ as it appears on the student record sheet: & & \@studienrichtung\tabularnewline
+ \@dirtype\ lt. Studienblatt\uvt@titlesep\@dirtype@en\ as it appears on the student record sheet: & & \@studienrichtung\tabularnewline
\noalign{\vskip6pt}
- Betreut von\,/\,Supervisor: & & \@supervisor\tabularnewline%
+ Betreut von\uvt@titlesep Supervisor: & & \@supervisor\tabularnewline%
\noalign{\vskip6pt}
- \ifx\@cosupervisor\@empty\else Mitbetreut von\,/\,Co-Supervisor: & & \@cosupervisor\fi
+ \ifx\@cosupervisor\@empty\else Mitbetreut von\uvt@titlesep Co-Supervisor: & & \@cosupervisor\fi
\end{tabular}\par
}
\par
@@ -571,7 +602,10 @@ This includes all drawings, sketches, graphics and internet sources.}
\cleardoubleemptypage
\fi
\ifx\titlepage@restore\relax\else\clearpage\titlepage@restore\fi
- \end{titlepage}
+ \end{titlepage}
+ \else% \if@uvt@titlepage
+ \setcounter{page}{2}%
+ \fi
\setcounter{footnote}{0}%
\expandafter\ifnum \csname scr@v@3.12\endcsname>\scr@compatibility\relax
\let\thanks\relax
@@ -802,6 +836,21 @@ This includes all drawings, sketches, graphics and internet sources.}
% End of @uvt@apa condition
\fi
+\else% @uvt@biblatex condition FALSE
+
+% Some support for legacy bibtex
+\AtBeginDocument{%
+ \@ifundefined{bibhang}{}{%
+ \setlength{\bibhang}{\parindent}%
+ }%
+ \@ifundefined{bibfont}{}{%
+ \renewcommand{\bibfont}{\small}%
+ }%
+ \@ifundefined{bibsep}{}{%
+ \setlength\bibsep{0pt}%
+ }%
+}
+
% End of @uvt@biblatex condition
\fi