diff --git a/CHANGELOG.md b/CHANGELOG.md index 46c1c568f6f1ceb27e46909d58fb10ae36317645..dd933c2475f8bf8b7459d01bee2f7bcca07375fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,34 @@ All notable changes to this project will be documented in this file. +## [Current] + +### Breaking + +- Changed `\ifsingleauthor` to directly accept two arguments: `\ifsingleauthor{true}{false}` + This makes usage much easyser and ensures that spaces will not be gobbled up. + + Here is a regex to fix existing code: `(?<=\\ifsingleauthor)(\{.*?\})\\else(\{.*?\})\\fi(\\space)?` + which you can replace with `$1$2`. + +### Fixed + +- `abstract` not working for `hsh-article` + +### Added + +- Using the `\and` command inside `\author` or `\matrikelnr` now works as expected (#21) + +## [3.2] + +### Fixed + +- missing comma caused \opt{1} to not work (#18) + +### Changed + +- moved all localization commands into one place + ## [3.1] ### Fixed diff --git a/README.md b/README.md index 6a8449213313d9b2b41a4b183b8323ad53364ecd..928e09421ad84171b84d9ba5263540d9fa1f85ee 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ +# LaTeX Template for Hochschule Hannover (mostly Fakulty I) + [](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh) [](https://www.latex-project.org/) [](https://hs-hannover.de/) <br> [](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/releases) -# What this is +## What this is This is a template designed to ease the workflow when writing documents for the Hochschule Hannover. It is intended to be used in all sophisticated works, from @@ -14,12 +16,14 @@ the `HsH-` prefix as well as support files. These classes extend the well known KOMA-Script classes and customize them with specific configurations, presets and provide commonly needed features. -# The different classes +## Documentation This project provides a set of additional classes designed for use in the Hochschule Hannover, Germany. They extend the well-known [KOMA-Script classes](https://ctan.org/pkg/koma-script) by adding styling and providing -some additional commands. You can find the full documentation of all features in +some additional commands. + +You can find the full documentation of all features in [src/HsH-classes.pdf](src/HsH-classes.pdf), but here is a short description of the different classes: @@ -56,16 +60,16 @@ different classes: </dd> </dl> -# Quick start guide +## Quick start guide -## I have now Idea how to start, show me +### I have now Idea how to start, show me 🔍 To get you started, there is a working example Project on the example branch that has loads of tips. Check it out [Online](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/tree/example) or locally using `git checkout example`. -## Recommended software +### Recommended software As a Tex-Distribution, [MiKTeX is recommended](https://miktex.org/), TexLive should also work, but I don't use it much. You will also need `perl` to run `latexmk` and other @@ -83,7 +87,7 @@ winget install "MiKTeX.MiKTeX" "StrawberryPerl.StrawberryPerl" "Git.Git" "Micros code --install-extension "James-Yu.latex-workshop" ``` -## Using the project as a template +### Using the project as a template The projects also provides a recommendation for a subfolder structure to keep things organized. If you don't want to use git and just want to get started in LaTeX, @@ -104,6 +108,7 @@ your system. ```shell # set up local git repo from template git clone -o upstream https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh.git [Project] +cd [Project] git branch -M [Project] # optional if you want to seperate your branch from origin/master git remote add origin [Project_URL] git push --set-upstream origin @@ -115,11 +120,11 @@ git commit --all -m "initalise for [Project]" git push ``` -> **Note** giving you Project name as the default branch name is optional, and you could +> **Note** giving you `[Project]` name as the default branch name is optional, and you could > keep the default name of `master`, but as the template also has a `master` branch it is > less confusing if you choose a different name. -## Compiling +### Compiling The Project comes with setting for `latexmk`, so you should be able to instantly compile using it. @@ -133,7 +138,7 @@ latexmk > configured correctly, but might be relevant if you choose a different build system > ([see below](#adding-src-to-path)). -# Common additions and expansions (Snippets) +## Common additions and expansions (Snippets) Sadly most Profs have widely different expectations when it comes to styling of written works. So you might find yourself having to change some settings. For some cases this @@ -144,7 +149,7 @@ of the project. Also, if you create your own set of additions that are useful for other, feel free to contact me and I will give you access right, so you can upload it there. -# Frequently Asked Questions +## Frequently Asked Questions ### How can I create my own title page @@ -155,6 +160,15 @@ Before you go to town, check out what others already published in [the snippets section](https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh/-/snippets). This will be a good starting point or maybe even already be what you want. +### How can I increase the left margin for printing? + +What you are trying to mmodify is called the "bindin correction". The option for that is `BCOR`. +You can set it to any size know to LaTeX and the margin will be increased accordingly, +always on the left side for `oneside` documents and alternating for `twoside` documents. + +> **Note** the textarea is not reduced, only moved. So a very large value for `BCOR` will +> move the content off the page. + ### Italic vs. upright Index? (changing subscript) The classes by default set all sub scripts upright ("steil" in German), because this is diff --git a/src/HsH-Logo.pdf b/src/HsH-Logo.pdf index cf3b12a738500c8381155a8aa18c3a341472c6de..f76ccde9fd50a907dce0064203124477e751e26b 100644 --- a/src/HsH-Logo.pdf +++ b/src/HsH-Logo.pdf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:76197994ebca0e82c4fb4be663c9df2123c74d05991ca492fbfd44d8c0568a95 -size 25798 +oid sha256:16b419c2e1327710c705d9c5af8bf16fdaf7d0ff98745c2a44e252d03e56f4ab +size 25795 diff --git a/src/HsH-article.cls b/src/HsH-article.cls index 59d25ab4ae36e9afc76fd5de01cf00c20009133b..61e1bd73dafd4ab39747ab268ca310b0e0f76698 100644 --- a/src/HsH-article.cls +++ b/src/HsH-article.cls @@ -4,7 +4,7 @@ %% %% The original source files were: %% -%% HsH-classes.dtx (with options: `article') +%% HsH-classes.dtx (with options: `article,localisation') %% %% Copyright (C) 2024 by Jan Wille <mail@janiwlle.de> %% @@ -17,7 +17,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2022-06-01] \ProvidesClass{HsH-article} - [2024-04-26 3.01 HsH-class based on KOMA] + [2024-06-15 3.03.pre1 HsH-class based on KOMA] \let\HsHClassName\@currname \def\HsHClassName@ParrentClass{% scrartcl% @@ -123,7 +123,9 @@ \headheight=\HsH@opt@headheight% } \newif\if@HsH@option@abstract@show@keywords -\def\HsH@abstract@chap{\addchap*} +\def\HsH@abstract@heading{% + \addsec*% +} \DefineFamilyKey{HsH}{abstract}{% \begingroup \FamilySetNumerical{HsH}{abstract}{@tempa}{% @@ -142,10 +144,14 @@ \@HsH@option@abstract@show@keywordsfalse \or% 2 \endgroup - \def\HsH@abstract@chap{\addchap} + \def\HsH@abstract@heading{% + \addsec% + } \or% 3 \endgroup - \def\HsH@abstract@chap{\addchap*} + \def\HsH@abstract@heading{% + \addsec*% + } \else% should never be \endgroup \fi @@ -195,7 +201,7 @@ \HsH@Options@DeclareAlias{ngerman}{language=ngerman} \def\HsH@opt@faculty{1} \FamilyNumericalKey{HsH}{faculty}{HsH@opt@faculty}{% - {0}{1}, {none}{1}, {false}{1}, {off}{1}% + {0}{1}, {none}{1}, {false}{1}, {off}{1},% {1}{2}, {f1}{2},% {2}{3}, {f2}{3},% {3}{4}, {f3}{4},% @@ -312,13 +318,15 @@ } } } -\let\@author\@empty \renewcommand{\title}[2][]{ \gdef\@title{#2} \gdef\@shorttitle{#1} } \def\@shorttitle{\@empty} -\newcommand{\matrikelnr}[1]{\gdef\@matrikelnr{#1}} +\def\gdef@with@and@as@comma#1#2{{\def\and{,}\xdef#1{#2}}} +\renewcommand{\author}[1]{\gdef@with@and@as@comma\@author{#1}} +\let\@author\@empty +\newcommand{\matrikelnr}[1]{\gdef@with@and@as@comma\@matrikelnr{#1}} \def\@matrikelnr{\@empty} \newcommand{\professor}[1]{\gdef\@professor{#1}} \def\@professor{\@empty} @@ -358,35 +366,16 @@ }\par \endgroup } -\newif\ifsingleauthor +\newif\if@singleauthor \AtBeginDocument{ \begingroup \newcount\count@ \count@=\z@ \@for\tmp@:=\@author\do{\advance\count@\@ne} - \ifnum\count@>\@ne\global\singleauthorfalse\else\global\singleauthortrue\fi + \ifnum\count@>\@ne\global\@singleauthorfalse\else\global\@singleauthortrue\fi \endgroup } -\newcommand{\decofauthname}{Declaration of Authorship} -\newcaptionname{english}\decofauthname{Declaration of Authorship} -\newcaptionname{german,ngerman}\decofauthname{Selbstst\"andigkeitserkl\"arung} -\newcommand{\decofauthtext}{Language not supported!} -\newcaptionname{english}\decofauthtext{% - \ifsingleauthor{I}\else{We}\fi\space hereby certify that the work \ifsingleauthor{I}\else{we}\fi\space - \ifsingleauthor am\else are\fi\space submitting is entirely of \ifsingleauthor{my}\else{our}\fi own - making except where otherwise indicated. \ifsingleauthor{I}\else{We}\fi\space - \ifsingleauthor{am}\else{are}\fi\space aware of regulations concerning plagiarism, including - disciplinary actions that may result from it. Any use of the works of any other author, in any form, - is properly acknowledged at their point of use. -} -\newcaptionname{german,ngerman}\decofauthtext{% - Hiermit best{\"a}tige\ifsingleauthor\else{n}\fi\space \ifsingleauthor ich\else wir\fi, dass die - folgende Arbeit eigenst{\"a}ndig von \ifsingleauthor{mir}\else{uns}\fi\space allein erstellt und - unter Ber{\"u}cksichtigung der zur Verf{\"u}gung gestellten Aufgabenstellung sowie dem Arbeitsmaterial - unter Angabe aller verwendeten Quellen erarbeitet wurde. Die Regelungen und Konsequenzen eines - Plagiats, inklusive disziplinarischer Ma{\ss}nahmen, sind \ifsingleauthor{mir}\else{uns}\fi\space - bewusst. Insbesondere wurden alle Zitate und gedanklichen {\"U}bernahmenals solche kenntlich gemacht. -} +\newcommand{\ifsingleauthor}[2]{\if@singleauthor#1\else#2\fi} \def\declarationAuthorship{% \ClassWarning{\HsHClassName}{% Command \string\declarationAuthorship\space is deprecate.\MessageBreak @@ -424,13 +413,10 @@ \renewcommand{\labelitemii}{\raisebox{.3ex}{\scalebox{0.7}{$\circ$}}} \renewcommand{\labelitemiii}{\raisebox{.1ex}{-}} \renewcommand{\labelitemiv}{\raisebox{-.1ex}{\scalebox{1.3}{$\cdot$}}} -\defcaptionname{german,ngerman}\abstractname{Abstract} -\newcaptionname{english}\keywordsname{Keywords} -\newcaptionname{german,ngerman}\keywordsname{Schl{\"u}sselw{\"o}rter} \renewenvironment{abstract}{ \quotation \setparsizes{\z@}{\z@}{.25\linewidth \@plus 1fil}\selectfont - \HsH@abstract@chap{\abstractname} + \HsH@abstract@heading{\abstractname} }{% \ifx\@keywords\@empty\else\if@HsH@option@abstract@show@keywords \par\bigskip @@ -477,15 +463,14 @@ \ofoot*{\pagemark} \pagestyle{HsHheadings} \automark{section} -\newcommand{\professortext}{Professor} -\newcommand{\firstexaminertext}{First examiner} -\newcommand{\secondexaminertext}{Second examiner} -\newcaptionname{english}\professortext{Professor} -\newcaptionname{english}\firstexaminertext{First examiner} -\newcaptionname{english}\secondexaminertext{Second examiner} -\newcaptionname{german,ngerman}\professortext{Professor(in)/Lehrbeauftragte(r)} -\newcaptionname{german,ngerman}\firstexaminertext{Erstpr{\"u}fer(in)} -\newcaptionname{german,ngerman}\secondexaminertext{Zweitpr{\"u}fer(in)} +\renewcommand\maketitle[1][c]{ + \if#1l\@maketitle{#1}\else% + \if#1c\@maketitle{#1}\else% + \if#1r\@maketitle{#1}\else% + \ClassWarning{\HsHClassName}{unkown option for \maketitle} + \thispagestyle{empty}\null\clearpage + \fi\fi\fi +} \newtoks\@tabtoks \newcommand\addtabtoks[1]{\global\@tabtoks\expandafter{\the\@tabtoks#1}} \newcommand\eaddtabtoks[1]{\edef\mytmp{#1}\expandafter\addtabtoks\expandafter{\mytmp}} @@ -493,7 +478,7 @@ \newcommand*\printtabtoks{\the\@tabtoks} \addtokomafont{publishers}{\normalsize} \g@addto@macro\titlepage{\singlespacing} -\renewcommand\maketitle[1][c]{ +\renewcommand*\@maketitle[1]{ \expandafter\ifnum \csname scr@v@3.12\endcsname>\scr@compatibility\relax \else \def\and{% @@ -518,13 +503,6 @@ } \fi \begingroup - \let\@param#1 - \ifx\@param\@empty - \ClassError{\myClassName}{\maketitle\space with empty option}{ - \maketitle[] has been called (with an empty parameter), this doesn't work. - Use \maketitle instead. - } - \fi \let\titlepage@restore\relax \renewcommand*\thefootnote{\@fnsymbol\c@footnote}% \let\@oldmakefnmark\@makefnmark @@ -556,8 +534,8 @@ \null \vskip 2em \begingroup - \if\@param c\centering\fi - \if\@param r\raggedleft\fi + \if#1c\centering\fi + \if#1r\raggedleft\fi \ifx\@subject\@empty\else {\usekomafont{subject}{\@subject\par}} \vskip 1.5em @@ -569,8 +547,8 @@ {\ifx\@matrikelnr\@empty \if\@author\@empty\else\usekomafont{author}{ \parbox{\dimexpr\linewidth}{ - \if\@param c\centering\fi - \if\@param r\raggedleft\fi + \if#1c\centering\fi + \if#1r\raggedleft\fi \@author } }\fi @@ -580,9 +558,11 @@ \foreach \x [count=\i,evaluate=\i as \y using {{\@matrikelnr,}[\i-1]}] in \@author {\eaddtabtoks{\x & \y\protect\\}} \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 + \if#1l\begin{tabular}{@{}l l}\fi + \if#1c\begin{tabular}{l l}\fi + \if#1r\begin{tabular}{r r@{}}\fi + \printtabtoks + \end{tabular} }% \fi \fi} @@ -591,12 +571,12 @@ \vskip 1em \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{\professortext:}&\@professor\\\fi - \if\@firstexaminer\@empty\else\textbf{\firstexaminertext:}&\@firstexaminer\\\fi - \if\@secondexaminer\@empty\else\textbf{\secondexaminertext:}&\@secondexaminer\\\fi + \if#1l\begin{tabular}{@{}l l}\fi + \if#1c\begin{tabular}{l l}\fi + \if#1r\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 @@ -644,6 +624,35 @@ \fi \global\let\and\relax } +\newcaptionname{english}\professorname{Professor} +\newcaptionname{german,ngerman}\professorname{Professor(in)/Lehrbeauftragte(r)} +\newcaptionname{english}\firstexaminername{First examiner} +\newcaptionname{german,ngerman}\firstexaminername{Erstpr{\"u}fer(in)} +\newcaptionname{english}\secondexaminername{Second examiner} +\newcaptionname{german,ngerman}\secondexaminername{Zweitpr{\"u}fer(in)} +\newcaptionname{english}\decofauthname{Declaration of Authorship} +\newcaptionname{german,ngerman}\decofauthname{Selbstst{\"a}ndigkeitserkl{\"a}rung} +\newcaptionname{english}\decofauthtext{% + \ifsingleauthor{I}{We} hereby certify that the work \ifsingleauthor{I}{we} + \ifsingleauthor{am}{are} submitting is entirely of \ifsingleauthor{my}{our} + own making except where otherwise indicated. \ifsingleauthor{I}{We} + \ifsingleauthor{am}{are} aware of regulations concerning plagiarism, + including disciplinary actions that may result from it. Any use of the + works of any other author, in any form, is properly acknowledged at + their point of use. +} +\newcaptionname{german,ngerman}\decofauthtext{% + Hiermit best{\"a}tige\ifsingleauthor{}{n} \ifsingleauthor{ich}{wir}, + dass die folgende Arbeit eigenst{\"a}ndig von \ifsingleauthor{mir}{uns} + allein erstellt und unter Ber{\"u}cksichtigung der zur Verf{\"u}gung + gestellten Aufgabenstellung sowie dem Arbeitsmaterial unter Angabe aller + verwendeten Quellen erarbeitet wurde. Die Regelungen und Konsequenzen + eines Plagiats, inklusive disziplinarischer Ma{\ss}nahmen, sind + \ifsingleauthor{mir}{uns} bewusst. Insbesondere wurden alle Zitate und + gedanklichen {\"U}bernahmen als solche kenntlich gemacht. +} +\newcaptionname{english}\keywordsname{Keywords} +\newcaptionname{german,ngerman}\keywordsname{Schl{\"u}sselw{\"o}rter} \endinput %% %% End of file `HsH-article.cls'. diff --git a/src/HsH-classes.cfg b/src/HsH-classes.cfg index 26e505cc615580067e8efddab638b6602ecd8d63..90d9e5fe30e0db3ea7463b3dd691e9a2d88f0b02 100644 --- a/src/HsH-classes.cfg +++ b/src/HsH-classes.cfg @@ -1,3 +1,5 @@ +%% opinionated settings: +\defcaptionname{german,ngerman}\abstractname{Abstract} %% configs for optional packages: \@ifpackageloaded{biblatex}{ \ExecuteBibliographyOptions{ diff --git a/src/HsH-classes.pdf b/src/HsH-classes.pdf index d8658378e80ede5cd72ede4124c8a027071c9848..b7fe37d1b8e5a454a9eb9f2b42ff17f09ba24f47 100644 --- a/src/HsH-classes.pdf +++ b/src/HsH-classes.pdf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8ded54f026e76b9a601a3e11c36b02ade14144ceba8415fe2bcaa6494fcd2d7 -size 315327 +oid sha256:a3ca4d9ef1ccd59568fd1dda194377c0e06b81b98f3f491ef05fbe0232b4d407 +size 314945 diff --git a/src/HsH-report.cls b/src/HsH-report.cls index 9582d332d5446bf6a717480b7c1e82d5e175e757..8ab2109f300a821835b98393fda92428cc6e0acd 100644 --- a/src/HsH-report.cls +++ b/src/HsH-report.cls @@ -4,7 +4,7 @@ %% %% The original source files were: %% -%% HsH-classes.dtx (with options: `report') +%% HsH-classes.dtx (with options: `report,localisation') %% %% Copyright (C) 2024 by Jan Wille <mail@janiwlle.de> %% @@ -17,7 +17,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2022-06-01] \ProvidesClass{HsH-report} - [2024-04-26 3.01 HsH-class based on KOMA] + [2024-06-15 3.03.pre1 HsH-class based on KOMA] \let\HsHClassName\@currname \def\HsHClassName@ParrentClass{% scrreprt% @@ -123,7 +123,9 @@ \headheight=\HsH@opt@headheight% } \newif\if@HsH@option@abstract@show@keywords -\def\HsH@abstract@chap{\addchap*} +\def\HsH@abstract@heading{% + \addchap*% +} \DefineFamilyKey{HsH}{abstract}{% \begingroup \FamilySetNumerical{HsH}{abstract}{@tempa}{% @@ -142,10 +144,14 @@ \@HsH@option@abstract@show@keywordsfalse \or% 2 \endgroup - \def\HsH@abstract@chap{\addchap} + \def\HsH@abstract@heading{% + \addchap% + } \or% 3 \endgroup - \def\HsH@abstract@chap{\addchap*} + \def\HsH@abstract@heading{% + \addchap*% + } \else% should never be \endgroup \fi @@ -195,7 +201,7 @@ \HsH@Options@DeclareAlias{ngerman}{language=ngerman} \def\HsH@opt@faculty{1} \FamilyNumericalKey{HsH}{faculty}{HsH@opt@faculty}{% - {0}{1}, {none}{1}, {false}{1}, {off}{1}% + {0}{1}, {none}{1}, {false}{1}, {off}{1},% {1}{2}, {f1}{2},% {2}{3}, {f2}{3},% {3}{4}, {f3}{4},% @@ -325,13 +331,15 @@ } } } -\let\@author\@empty \renewcommand{\title}[2][]{ \gdef\@title{#2} \gdef\@shorttitle{#1} } \def\@shorttitle{\@empty} -\newcommand{\matrikelnr}[1]{\gdef\@matrikelnr{#1}} +\def\gdef@with@and@as@comma#1#2{{\def\and{,}\xdef#1{#2}}} +\renewcommand{\author}[1]{\gdef@with@and@as@comma\@author{#1}} +\let\@author\@empty +\newcommand{\matrikelnr}[1]{\gdef@with@and@as@comma\@matrikelnr{#1}} \def\@matrikelnr{\@empty} \newcommand{\professor}[1]{\gdef\@professor{#1}} \def\@professor{\@empty} @@ -371,35 +379,16 @@ }\par \endgroup } -\newif\ifsingleauthor +\newif\if@singleauthor \AtBeginDocument{ \begingroup \newcount\count@ \count@=\z@ \@for\tmp@:=\@author\do{\advance\count@\@ne} - \ifnum\count@>\@ne\global\singleauthorfalse\else\global\singleauthortrue\fi + \ifnum\count@>\@ne\global\@singleauthorfalse\else\global\@singleauthortrue\fi \endgroup } -\newcommand{\decofauthname}{Declaration of Authorship} -\newcaptionname{english}\decofauthname{Declaration of Authorship} -\newcaptionname{german,ngerman}\decofauthname{Selbstst\"andigkeitserkl\"arung} -\newcommand{\decofauthtext}{Language not supported!} -\newcaptionname{english}\decofauthtext{% - \ifsingleauthor{I}\else{We}\fi\space hereby certify that the work \ifsingleauthor{I}\else{we}\fi\space - \ifsingleauthor am\else are\fi\space submitting is entirely of \ifsingleauthor{my}\else{our}\fi own - making except where otherwise indicated. \ifsingleauthor{I}\else{We}\fi\space - \ifsingleauthor{am}\else{are}\fi\space aware of regulations concerning plagiarism, including - disciplinary actions that may result from it. Any use of the works of any other author, in any form, - is properly acknowledged at their point of use. -} -\newcaptionname{german,ngerman}\decofauthtext{% - Hiermit best{\"a}tige\ifsingleauthor\else{n}\fi\space \ifsingleauthor ich\else wir\fi, dass die - folgende Arbeit eigenst{\"a}ndig von \ifsingleauthor{mir}\else{uns}\fi\space allein erstellt und - unter Ber{\"u}cksichtigung der zur Verf{\"u}gung gestellten Aufgabenstellung sowie dem Arbeitsmaterial - unter Angabe aller verwendeten Quellen erarbeitet wurde. Die Regelungen und Konsequenzen eines - Plagiats, inklusive disziplinarischer Ma{\ss}nahmen, sind \ifsingleauthor{mir}\else{uns}\fi\space - bewusst. Insbesondere wurden alle Zitate und gedanklichen {\"U}bernahmenals solche kenntlich gemacht. -} +\newcommand{\ifsingleauthor}[2]{\if@singleauthor#1\else#2\fi} \def\declarationAuthorship{% \ClassWarning{\HsHClassName}{% Command \string\declarationAuthorship\space is deprecate.\MessageBreak @@ -437,13 +426,10 @@ \renewcommand{\labelitemii}{\raisebox{.3ex}{\scalebox{0.7}{$\circ$}}} \renewcommand{\labelitemiii}{\raisebox{.1ex}{-}} \renewcommand{\labelitemiv}{\raisebox{-.1ex}{\scalebox{1.3}{$\cdot$}}} -\defcaptionname{german,ngerman}\abstractname{Abstract} -\newcaptionname{english}\keywordsname{Keywords} -\newcaptionname{german,ngerman}\keywordsname{Schl{\"u}sselw{\"o}rter} \renewenvironment{abstract}{ \quotation \setparsizes{\z@}{\z@}{.25\linewidth \@plus 1fil}\selectfont - \HsH@abstract@chap{\abstractname} + \HsH@abstract@heading{\abstractname} }{% \ifx\@keywords\@empty\else\if@HsH@option@abstract@show@keywords \par\bigskip @@ -491,15 +477,14 @@ \pagestyle{HsHheadings} \automark{chapter} \renewcommand*{\chapterpagestyle}{HsHheadings} -\newcommand{\professortext}{Professor} -\newcommand{\firstexaminertext}{First examiner} -\newcommand{\secondexaminertext}{Second examiner} -\newcaptionname{english}\professortext{Professor} -\newcaptionname{english}\firstexaminertext{First examiner} -\newcaptionname{english}\secondexaminertext{Second examiner} -\newcaptionname{german,ngerman}\professortext{Professor(in)/Lehrbeauftragte(r)} -\newcaptionname{german,ngerman}\firstexaminertext{Erstpr{\"u}fer(in)} -\newcaptionname{german,ngerman}\secondexaminertext{Zweitpr{\"u}fer(in)} +\renewcommand\maketitle[1][l]{ + \if#1l\@maketitle{#1}\else% + \if#1c\@maketitle{#1}\else% + \if#1r\@maketitle{#1}\else% + \ClassWarning{\HsHClassName}{unkown option for \maketitle} + \thispagestyle{empty}\null\clearpage + \fi\fi\fi +} \newtoks\@tabtoks \newcommand\addtabtoks[1]{\global\@tabtoks\expandafter{\the\@tabtoks#1}} \newcommand\eaddtabtoks[1]{\edef\mytmp{#1}\expandafter\addtabtoks\expandafter{\mytmp}} @@ -507,7 +492,7 @@ \newcommand*\printtabtoks{\the\@tabtoks} \addtokomafont{publishers}{\normalsize} \g@addto@macro\titlepage{\singlespacing} -\renewcommand\maketitle[1][l]{ +\renewcommand*\@maketitle[1]{ \expandafter\ifnum \csname scr@v@3.12\endcsname>\scr@compatibility\relax \else \def\and{% @@ -517,13 +502,6 @@ } \fi \begin{titlepage} - \let\@param#1 - \ifx\@param\@empty - \ClassError{\myClassName}{\maketitle\space with empty option}{ - \maketitle[] has been called (with an empty parameter), this doesn't work. - Use \maketitle instead. - } - \fi \if@titlepageiscoverpage \edef\titlepage@restore{ \noexpand\endgroup @@ -586,8 +564,8 @@ \null \vfill \begingroup - \if\@param c\centering\fi - \if\@param r\raggedleft\fi + \if#1c\centering\fi + \if#1r\raggedleft\fi \ifx\@subject\@empty\else {\usekomafont{subject}{\@subject\par}} \vskip 3em @@ -599,8 +577,8 @@ {\ifx\@matrikelnr\@empty \if\@author\@empty\else\usekomafont{author}{ \parbox{\dimexpr\linewidth}{ - \if\@param c\centering\fi - \if\@param r\raggedleft\fi + \if#1c\centering\fi + \if#1r\raggedleft\fi \@author } }\fi @@ -610,9 +588,11 @@ \foreach \x [count=\i,evaluate=\i as \y using {{\@matrikelnr,}[\i-1]}] in \@author {\eaddtabtoks{\x & \y\protect\\}} \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 + \if#1l\begin{tabular}{@{}l l}\fi + \if#1c\begin{tabular}{l l}\fi + \if#1r\begin{tabular}{r r@{}}\fi + \printtabtoks + \end{tabular} }% \fi \fi} @@ -621,12 +601,12 @@ \vskip \z@ \@plus3fill \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{\professortext:}&\@professor\\\fi - \if\@firstexaminer\@empty\else\textbf{\firstexaminertext:}&\@firstexaminer\\\fi - \if\@secondexaminer\@empty\else\textbf{\secondexaminertext:}&\@secondexaminer\\\fi + \if#1l\begin{tabular}{@{}l l}\fi + \if#1c\begin{tabular}{l l}\fi + \if#1r\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 @@ -714,6 +694,35 @@ \fi \global\let\and\relax } +\newcaptionname{english}\professorname{Professor} +\newcaptionname{german,ngerman}\professorname{Professor(in)/Lehrbeauftragte(r)} +\newcaptionname{english}\firstexaminername{First examiner} +\newcaptionname{german,ngerman}\firstexaminername{Erstpr{\"u}fer(in)} +\newcaptionname{english}\secondexaminername{Second examiner} +\newcaptionname{german,ngerman}\secondexaminername{Zweitpr{\"u}fer(in)} +\newcaptionname{english}\decofauthname{Declaration of Authorship} +\newcaptionname{german,ngerman}\decofauthname{Selbstst{\"a}ndigkeitserkl{\"a}rung} +\newcaptionname{english}\decofauthtext{% + \ifsingleauthor{I}{We} hereby certify that the work \ifsingleauthor{I}{we} + \ifsingleauthor{am}{are} submitting is entirely of \ifsingleauthor{my}{our} + own making except where otherwise indicated. \ifsingleauthor{I}{We} + \ifsingleauthor{am}{are} aware of regulations concerning plagiarism, + including disciplinary actions that may result from it. Any use of the + works of any other author, in any form, is properly acknowledged at + their point of use. +} +\newcaptionname{german,ngerman}\decofauthtext{% + Hiermit best{\"a}tige\ifsingleauthor{}{n} \ifsingleauthor{ich}{wir}, + dass die folgende Arbeit eigenst{\"a}ndig von \ifsingleauthor{mir}{uns} + allein erstellt und unter Ber{\"u}cksichtigung der zur Verf{\"u}gung + gestellten Aufgabenstellung sowie dem Arbeitsmaterial unter Angabe aller + verwendeten Quellen erarbeitet wurde. Die Regelungen und Konsequenzen + eines Plagiats, inklusive disziplinarischer Ma{\ss}nahmen, sind + \ifsingleauthor{mir}{uns} bewusst. Insbesondere wurden alle Zitate und + gedanklichen {\"U}bernahmen als solche kenntlich gemacht. +} +\newcaptionname{english}\keywordsname{Keywords} +\newcaptionname{german,ngerman}\keywordsname{Schl{\"u}sselw{\"o}rter} \endinput %% %% End of file `HsH-report.cls'. diff --git a/src/HsH-standalone.cls b/src/HsH-standalone.cls index f23662b6d82fa2aa57bcaf9b5ec2f0f2eaf4bcfd..b1720da693c9ac67b5a4621152bcdcb8072ed9e5 100644 --- a/src/HsH-standalone.cls +++ b/src/HsH-standalone.cls @@ -4,7 +4,7 @@ %% %% The original source files were: %% -%% HsH-classes.dtx (with options: `standalone') +%% HsH-classes.dtx (with options: `standalone,localisation') %% %% Copyright (C) 2024 by Jan Wille <mail@janiwlle.de> %% @@ -17,7 +17,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2022-06-01] \ProvidesClass{HsH-standalone} - [2024-04-26 3.01 HsH-class based on KOMA] + [2024-06-15 3.03.pre1 HsH-class based on KOMA] \let\HsHClassName\@currname \def\HsHClassName@ParrentClass{% standalone% @@ -66,7 +66,7 @@ \HsH@Options@DeclareAlias{ngerman}{language=ngerman} \def\HsH@opt@faculty{1} \FamilyNumericalKey{HsH}{faculty}{HsH@opt@faculty}{% - {0}{1}, {none}{1}, {false}{1}, {off}{1}% + {0}{1}, {none}{1}, {false}{1}, {off}{1},% {1}{2}, {f1}{2},% {2}{3}, {f2}{3},% {3}{4}, {f3}{4},% @@ -194,35 +194,16 @@ }\par \endgroup } -\newif\ifsingleauthor +\newif\if@singleauthor \AtBeginDocument{ \begingroup \newcount\count@ \count@=\z@ \@for\tmp@:=\@author\do{\advance\count@\@ne} - \ifnum\count@>\@ne\global\singleauthorfalse\else\global\singleauthortrue\fi + \ifnum\count@>\@ne\global\@singleauthorfalse\else\global\@singleauthortrue\fi \endgroup } -\newcommand{\decofauthname}{Declaration of Authorship} -\newcaptionname{english}\decofauthname{Declaration of Authorship} -\newcaptionname{german,ngerman}\decofauthname{Selbstst\"andigkeitserkl\"arung} -\newcommand{\decofauthtext}{Language not supported!} -\newcaptionname{english}\decofauthtext{% - \ifsingleauthor{I}\else{We}\fi\space hereby certify that the work \ifsingleauthor{I}\else{we}\fi\space - \ifsingleauthor am\else are\fi\space submitting is entirely of \ifsingleauthor{my}\else{our}\fi own - making except where otherwise indicated. \ifsingleauthor{I}\else{We}\fi\space - \ifsingleauthor{am}\else{are}\fi\space aware of regulations concerning plagiarism, including - disciplinary actions that may result from it. Any use of the works of any other author, in any form, - is properly acknowledged at their point of use. -} -\newcaptionname{german,ngerman}\decofauthtext{% - Hiermit best{\"a}tige\ifsingleauthor\else{n}\fi\space \ifsingleauthor ich\else wir\fi, dass die - folgende Arbeit eigenst{\"a}ndig von \ifsingleauthor{mir}\else{uns}\fi\space allein erstellt und - unter Ber{\"u}cksichtigung der zur Verf{\"u}gung gestellten Aufgabenstellung sowie dem Arbeitsmaterial - unter Angabe aller verwendeten Quellen erarbeitet wurde. Die Regelungen und Konsequenzen eines - Plagiats, inklusive disziplinarischer Ma{\ss}nahmen, sind \ifsingleauthor{mir}\else{uns}\fi\space - bewusst. Insbesondere wurden alle Zitate und gedanklichen {\"U}bernahmenals solche kenntlich gemacht. -} +\newcommand{\ifsingleauthor}[2]{\if@singleauthor#1\else#2\fi} \def\declarationAuthorship{% \ClassWarning{\HsHClassName}{% Command \string\declarationAuthorship\space is deprecate.\MessageBreak @@ -240,23 +221,38 @@ \renewcommand{\labelitemii}{\raisebox{.3ex}{\scalebox{0.7}{$\circ$}}} \renewcommand{\labelitemiii}{\raisebox{.1ex}{-}} \renewcommand{\labelitemiv}{\raisebox{-.1ex}{\scalebox{1.3}{$\cdot$}}} -\defcaptionname{german,ngerman}\abstractname{Abstract} -\newcaptionname{english}\keywordsname{Keywords} -\newcaptionname{german,ngerman}\keywordsname{Schl{\"u}sselw{\"o}rter} -\renewenvironment{abstract}{ - \quotation - \setparsizes{\z@}{\z@}{.25\linewidth \@plus 1fil}\selectfont - \HsH@abstract@chap{\abstractname} -}{% - \ifx\@keywords\@empty\else\if@HsH@option@abstract@show@keywords - \par\bigskip - \noindent\textbf{\keywordsname}\hskip 2em\@keywords - \fi\fi\par - \endquotation -} \upsubscripts \raggedbottom \let\layercontentsmeasure\relax +\newcaptionname{english}\professorname{Professor} +\newcaptionname{german,ngerman}\professorname{Professor(in)/Lehrbeauftragte(r)} +\newcaptionname{english}\firstexaminername{First examiner} +\newcaptionname{german,ngerman}\firstexaminername{Erstpr{\"u}fer(in)} +\newcaptionname{english}\secondexaminername{Second examiner} +\newcaptionname{german,ngerman}\secondexaminername{Zweitpr{\"u}fer(in)} +\newcaptionname{english}\decofauthname{Declaration of Authorship} +\newcaptionname{german,ngerman}\decofauthname{Selbstst{\"a}ndigkeitserkl{\"a}rung} +\newcaptionname{english}\decofauthtext{% + \ifsingleauthor{I}{We} hereby certify that the work \ifsingleauthor{I}{we} + \ifsingleauthor{am}{are} submitting is entirely of \ifsingleauthor{my}{our} + own making except where otherwise indicated. \ifsingleauthor{I}{We} + \ifsingleauthor{am}{are} aware of regulations concerning plagiarism, + including disciplinary actions that may result from it. Any use of the + works of any other author, in any form, is properly acknowledged at + their point of use. +} +\newcaptionname{german,ngerman}\decofauthtext{% + Hiermit best{\"a}tige\ifsingleauthor{}{n} \ifsingleauthor{ich}{wir}, + dass die folgende Arbeit eigenst{\"a}ndig von \ifsingleauthor{mir}{uns} + allein erstellt und unter Ber{\"u}cksichtigung der zur Verf{\"u}gung + gestellten Aufgabenstellung sowie dem Arbeitsmaterial unter Angabe aller + verwendeten Quellen erarbeitet wurde. Die Regelungen und Konsequenzen + eines Plagiats, inklusive disziplinarischer Ma{\ss}nahmen, sind + \ifsingleauthor{mir}{uns} bewusst. Insbesondere wurden alle Zitate und + gedanklichen {\"U}bernahmen als solche kenntlich gemacht. +} +\newcaptionname{english}\keywordsname{Keywords} +\newcaptionname{german,ngerman}\keywordsname{Schl{\"u}sselw{\"o}rter} \endinput %% %% End of file `HsH-standalone.cls'.