diff --git a/CHANGELOG.md b/CHANGELOG.md index ea57924f1e5364e60b9e304d0f4a3e30b933bf1c..c0e7cdcf5c53b7cd44ad668457527317f5191c6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ All notable changes to this project will be documented in this file. - the margins are now set using relative values, which makes them adapt to different paper sizes - add alignment parameter to `\declarationofauthorship`, it is still by default aligned to the bottom of the page, but can now be pushed to the top using `\declarationofauthorship[t]` +### Added + +- macros for titlepage: `\firstexaminer` and `\secondexaminer` + ## [2.0] ### Changed diff --git a/HsH-classes.dtx b/HsH-classes.dtx index e7d8036ccdc9974a22fcca003436f88fe51d3e3a..37941f76560156b2917a213e3f67c702011597cf 100644 --- a/HsH-classes.dtx +++ b/HsH-classes.dtx @@ -196,6 +196,10 @@ \newcommand{\matrikelnr}[1]{\gdef\@matrikelnr{#1}} \newcommand*{\@professor}{} \newcommand{\professor}[1]{\gdef\@professor{#1}} +\newcommand*{\@firstexaminer}{} +\newcommand{\firstexaminer}[1]{\gdef\@firstexaminer{#1}} +\newcommand*{\@secondexaminer}{} +\newcommand{\secondexaminer}[1]{\gdef\@secondexaminer{#1}} \newcommand*{\@keywords}{} \newcommand{\keywords}[1]{\gdef\@keywords{#1}} \let\@author\@empty @@ -418,6 +422,16 @@ % %% reconfig Titlepage ----------------------------------------------------------------------------- +\iflanguage{english}{ + \setlocalecaption{english}{professor}{Professor} + \setlocalecaption{english}{firstexaminer}{First examiner} + \setlocalecaption{english}{secondexaminer}{Second examiner} +}{}% +\iflanguage{ngerman}{ + \setlocalecaption{ngerman}{professor}{Professor(in)/Lehrbeauftragte(r)} + \setlocalecaption{ngerman}{firstexaminer}{Erstpr{\"u}fer(in)} + \setlocalecaption{ngerman}{secondexaminer}{Zweitpr{\"u}fer(in)} +}{}% \newtoks\@tabtoks \newcommand\addtabtoks[1]{\global\@tabtoks\expandafter{\the\@tabtoks#1}} \newcommand\eaddtabtoks[1]{\edef\mytmp{#1}\expandafter\addtabtoks\expandafter{\mytmp}} @@ -568,7 +582,8 @@ \if\@author\@empty\else % sneeky comma needed after \@matrikelnr to deal with single item lists \foreach \x [count=\i,evaluate=\i as \y using {{\@matrikelnr,}[\i-1]}] in \@author {\eaddtabtoks{\x & \y\protect\\}} - \usekomafont{author}{\def\arraystretch{1.2} + \usekomafont{author}{ + \def\arraystretch{1.2} \if\@param l\begin{tabular}{@{}l l}\printtabtoks\end{tabular}\fi \if\@param c\begin{tabular}{l l}\printtabtoks\end{tabular}\fi \if\@param r\begin{tabular}{r r@{}}\printtabtoks\end{tabular}\fi @@ -580,7 +595,16 @@ {\usekomafont{date}{\@date\par}} %<article> \vskip 1em %<report> \vskip \z@ \@plus3fill - {\if\@professor\@empty\else\usekomafont{publishers}{Professor\iflanguage{ngerman}{(in)/Lehrbeauftragte(r)}{}: \@professor}\fi} + \usekomafont{publishers}{ + \def\arraystretch{1.2} + \if\@param l\begin{tabular}{@{}l l}\fi + \if\@param c\begin{tabular}{l l}\fi + \if\@param r\begin{tabular}{r r@{}}\fi + \if\@professor\@empty\else\textbf{\professorname:}&\@professor\\\fi + \if\@firstexaminer\@empty\else\textbf{\firstexaminername:}&\@firstexaminer\\\fi + \if\@secondexaminer\@empty\else\textbf{\secondexaminername:}&\@secondexaminer\\\fi + \end{tabular} + } %<*article> \ifx\@dedication\@empty\else \vskip 2em diff --git a/README.md b/README.md index 7ce5169ff50346e7fa2f047cc876a484b95573e2..e4d81bec41749a67cc87e0f5fcddd4037ca449d4 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,8 @@ You can use the following macros to define the different information presented o - `\subtitle` is a smaller second line under the title. Can be empty - `\date` is the date of your project. You can use a custom one, but if you don't set it, the current date at compile time will be used. - `\professor` a new macro do define your professors name, if needed. +- `\firstexaminer` a new macro do define your first examiners name, if needed. +- `\secondexaminer` a new macro do define your second examiners name, if needed. - `\keywords` will not be printed on the title-page, but rather on the end of the abstract, if you define some. They will also be but into the PDFs metadata. diff --git a/src/HsH-article.cls b/src/HsH-article.cls index 2e04a9ace1187d238653a14f7e39ee497962d116..1d12944d2a760edc80560c1ae4764070086d1c80 100644 --- a/src/HsH-article.cls +++ b/src/HsH-article.cls @@ -145,6 +145,10 @@ \newcommand{\matrikelnr}[1]{\gdef\@matrikelnr{#1}} \newcommand*{\@professor}{} \newcommand{\professor}[1]{\gdef\@professor{#1}} +\newcommand*{\@firstexaminer}{} +\newcommand{\firstexaminer}[1]{\gdef\@firstexaminer{#1}} +\newcommand*{\@secondexaminer}{} +\newcommand{\secondexaminer}[1]{\gdef\@secondexaminer{#1}} \newcommand*{\@keywords}{} \newcommand{\keywords}[1]{\gdef\@keywords{#1}} \let\@author\@empty @@ -288,6 +292,16 @@ \let\declarationAuthorship\declarationofauthorship %% reconfig Titlepage ----------------------------------------------------------------------------- +\iflanguage{english}{ + \setlocalecaption{english}{professor}{Professor} + \setlocalecaption{english}{firstexaminer}{First examiner} + \setlocalecaption{english}{secondexaminer}{Second examiner} +}{}% +\iflanguage{ngerman}{ + \setlocalecaption{ngerman}{professor}{Professor(in)/Lehrbeauftragte(r)} + \setlocalecaption{ngerman}{firstexaminer}{Erstpr{\"u}fer(in)} + \setlocalecaption{ngerman}{secondexaminer}{Zweitpr{\"u}fer(in)} +}{}% \newtoks\@tabtoks \newcommand\addtabtoks[1]{\global\@tabtoks\expandafter{\the\@tabtoks#1}} \newcommand\eaddtabtoks[1]{\edef\mytmp{#1}\expandafter\addtabtoks\expandafter{\mytmp}} @@ -377,7 +391,8 @@ \if\@author\@empty\else % sneeky comma needed after \@matrikelnr to deal with single item lists \foreach \x [count=\i,evaluate=\i as \y using {{\@matrikelnr,}[\i-1]}] in \@author {\eaddtabtoks{\x & \y\protect\\}} - \usekomafont{author}{\def\arraystretch{1.2} + \usekomafont{author}{ + \def\arraystretch{1.2} \if\@param l\begin{tabular}{@{}l l}\printtabtoks\end{tabular}\fi \if\@param c\begin{tabular}{l l}\printtabtoks\end{tabular}\fi \if\@param r\begin{tabular}{r r@{}}\printtabtoks\end{tabular}\fi @@ -387,7 +402,16 @@ \vskip 1em {\usekomafont{date}{\@date\par}} \vskip 1em - {\if\@professor\@empty\else\usekomafont{publishers}{Professor\iflanguage{ngerman}{(in)/Lehrbeauftragte(r)}{}: \@professor}\fi} + \usekomafont{publishers}{ + \def\arraystretch{1.2} + \if\@param l\begin{tabular}{@{}l l}\fi + \if\@param c\begin{tabular}{l l}\fi + \if\@param r\begin{tabular}{r r@{}}\fi + \if\@professor\@empty\else\textbf{\professorname:}&\@professor\\\fi + \if\@firstexaminer\@empty\else\textbf{\firstexaminername:}&\@firstexaminer\\\fi + \if\@secondexaminer\@empty\else\textbf{\secondexaminername:}&\@secondexaminer\\\fi + \end{tabular} + } \ifx\@dedication\@empty\else \vskip 2em {\usekomafont{dedication}{\@dedication \par}}% diff --git a/src/HsH-report.cls b/src/HsH-report.cls index 7d8282545c247b62e75f0f17a4983f121ac66733..bbb8423cfefb45301fee051a9c081ca4e9ed6f9e 100644 --- a/src/HsH-report.cls +++ b/src/HsH-report.cls @@ -145,6 +145,10 @@ \newcommand{\matrikelnr}[1]{\gdef\@matrikelnr{#1}} \newcommand*{\@professor}{} \newcommand{\professor}[1]{\gdef\@professor{#1}} +\newcommand*{\@firstexaminer}{} +\newcommand{\firstexaminer}[1]{\gdef\@firstexaminer{#1}} +\newcommand*{\@secondexaminer}{} +\newcommand{\secondexaminer}[1]{\gdef\@secondexaminer{#1}} \newcommand*{\@keywords}{} \newcommand{\keywords}[1]{\gdef\@keywords{#1}} \let\@author\@empty @@ -320,6 +324,16 @@ \let\declarationAuthorship\declarationofauthorship %% reconfig Titlepage ----------------------------------------------------------------------------- +\iflanguage{english}{ + \setlocalecaption{english}{professor}{Professor} + \setlocalecaption{english}{firstexaminer}{First examiner} + \setlocalecaption{english}{secondexaminer}{Second examiner} +}{}% +\iflanguage{ngerman}{ + \setlocalecaption{ngerman}{professor}{Professor(in)/Lehrbeauftragte(r)} + \setlocalecaption{ngerman}{firstexaminer}{Erstpr{\"u}fer(in)} + \setlocalecaption{ngerman}{secondexaminer}{Zweitpr{\"u}fer(in)} +}{}% \newtoks\@tabtoks \newcommand\addtabtoks[1]{\global\@tabtoks\expandafter{\the\@tabtoks#1}} \newcommand\eaddtabtoks[1]{\edef\mytmp{#1}\expandafter\addtabtoks\expandafter{\mytmp}} @@ -425,7 +439,8 @@ \if\@author\@empty\else % sneeky comma needed after \@matrikelnr to deal with single item lists \foreach \x [count=\i,evaluate=\i as \y using {{\@matrikelnr,}[\i-1]}] in \@author {\eaddtabtoks{\x & \y\protect\\}} - \usekomafont{author}{\def\arraystretch{1.2} + \usekomafont{author}{ + \def\arraystretch{1.2} \if\@param l\begin{tabular}{@{}l l}\printtabtoks\end{tabular}\fi \if\@param c\begin{tabular}{l l}\printtabtoks\end{tabular}\fi \if\@param r\begin{tabular}{r r@{}}\printtabtoks\end{tabular}\fi @@ -435,7 +450,16 @@ \vskip 1.5em {\usekomafont{date}{\@date\par}} \vskip \z@ \@plus3fill - {\if\@professor\@empty\else\usekomafont{publishers}{Professor\iflanguage{ngerman}{(in)/Lehrbeauftragte(r)}{}: \@professor}\fi} + \usekomafont{publishers}{ + \def\arraystretch{1.2} + \if\@param l\begin{tabular}{@{}l l}\fi + \if\@param c\begin{tabular}{l l}\fi + \if\@param r\begin{tabular}{r r@{}}\fi + \if\@professor\@empty\else\textbf{\professorname:}&\@professor\\\fi + \if\@firstexaminer\@empty\else\textbf{\firstexaminername:}&\@firstexaminer\\\fi + \if\@secondexaminer\@empty\else\textbf{\secondexaminername:}&\@secondexaminer\\\fi + \end{tabular} + } \par \endgroup \vskip 3em