From d7645beb449b01f17ded76db85d1543ffb6236a7 Mon Sep 17 00:00:00 2001 From: Jan Wille <jan.wille@stud.hs-hannover.de> Date: Thu, 25 Apr 2024 18:45:37 +0200 Subject: [PATCH] run latexindent to prettiefy the code --- src/HsH-article.cls | 83 +-- src/HsH-classes.dtx | 1398 ++++++++++++++++++++-------------------- src/HsH-classes.pdf | 4 +- src/HsH-report.cls | 83 +-- src/HsH-standalone.cls | 40 +- 5 files changed, 805 insertions(+), 803 deletions(-) diff --git a/src/HsH-article.cls b/src/HsH-article.cls index 5cc8ff4..0991933 100644 --- a/src/HsH-article.cls +++ b/src/HsH-article.cls @@ -17,7 +17,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2022-06-01] \ProvidesClass{HsH-article} - [2024-04-25 3.01 HsH-class based on KOMA] + [2024-04-25 3.01 HsH-class based on KOMA] \let\HsHClassName\@currname \def\HsHClassName@ParrentClass{% scrartcl% @@ -35,56 +35,56 @@ } \DefineFamilyKey{HsH}{fontfamily}{ \begingroup - \FamilySetNumerical{HsH}{parskip}{@tmp}{% - {sans}{0}, {sans-serif}{0},% - {roman}{1}, {serif}{1},% - }{#1} - \ifx\FamilyKeyState\FamilyKeyStateProcessed - \aftergroup\FamilyKeyStateProcessed - \ifcase\@tmp% 0 - \endgroup - \renewcommand{\familydefault}{\sfdefault} - \if@atdocument\AfterKOMAoptions{\selectfont}\fi - \or% 1 - \endgroup - \renewcommand{\familydefault}{\rmdefault} - \if@atdocument\AfterKOMAoptions{\selectfont}\fi - \else% should never be - \endgroup - \fi - \else + \FamilySetNumerical{HsH}{parskip}{@tmp}{% + {sans}{0}, {sans-serif}{0},% + {roman}{1}, {serif}{1},% + }{#1} + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \aftergroup\FamilyKeyStateProcessed + \ifcase\@tmp% 0 + \endgroup + \renewcommand{\familydefault}{\sfdefault} + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \or% 1 + \endgroup + \renewcommand{\familydefault}{\rmdefault} + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \else% should never be \endgroup - \FamilyKeyStateUnknownValue \fi + \else + \endgroup + \FamilyKeyStateUnknownValue + \fi } \HsH@Options@DeclareAlias{sans}{fontfamily=sans} \HsH@Options@DeclareAlias{roman}{fontfamily=roman} \DefineFamilyKey{HsH}{linespacing}{ \begingroup - \FamilySetNumerical{HsH}{linespacing}{@tempa}{% - {single}{0},% - {onehalf}{1},% - {double}{2},% - }{#1} - \ifx\FamilyKeyState\FamilyKeyStateProcessed - \aftergroup\FamilyKeyStateProcessed - \ifcase\@tempa% 0 - \endgroup - \if@atdocument\singlespacing\else\AtEndOfClass{\singlespacing}\fi - \or% 1 - \endgroup - \if@atdocument\onehalfspacing\else\AtEndOfClass{\onehalfspacing\AfterTOCHead{\singlespacing}}\fi - \or% 2 - \endgroup - \if@atdocument\doublespacing\else\AtEndOfClass{\doublespacing\AfterTOCHead{\singlespacing}}\fi + \FamilySetNumerical{HsH}{linespacing}{@tempa}{% + {single}{0},% + {onehalf}{1},% + {double}{2},% + }{#1} + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \aftergroup\FamilyKeyStateProcessed + \ifcase\@tempa% 0 + \endgroup + \if@atdocument\singlespacing\else\AtEndOfClass{\singlespacing}\fi + \or% 1 + \endgroup + \if@atdocument\onehalfspacing\else\AtEndOfClass{\onehalfspacing\AfterTOCHead{\singlespacing}}\fi + \or% 2 + \endgroup + \if@atdocument\doublespacing\else\AtEndOfClass{\doublespacing\AfterTOCHead{\singlespacing}}\fi - \else% should never be - \endgroup - \fi - \else + \else% should never be \endgroup - \FamilyKeyStateUnknownValue \fi + \else + \endgroup + \FamilyKeyStateUnknownValue + \fi } \HsH@Options@DeclareAlias{singlespacing}{linespacing=single} \HsH@Options@DeclareAlias{onehalfspacing}{linespacing=onehalf} @@ -412,6 +412,7 @@ \newtoks\@tabtoks \newcommand\addtabtoks[1]{\global\@tabtoks\expandafter{\the\@tabtoks#1}} \newcommand\eaddtabtoks[1]{\edef\mytmp{#1}\expandafter\addtabtoks\expandafter{\mytmp}} +%%%\newcommand*\resettabtoks{\global\@tabtoks{}} \newcommand*\printtabtoks{\the\@tabtoks} \addtokomafont{publishers}{\normalsize} \g@addto@macro\titlepage{\singlespacing} diff --git a/src/HsH-classes.dtx b/src/HsH-classes.dtx index dac0aa7..3901492 100644 --- a/src/HsH-classes.dtx +++ b/src/HsH-classes.dtx @@ -1,5 +1,5 @@ %^^A !TeX root = ./HsH-classes.dtx -% \iffalse meta-comment +%\iffalse meta-comment %<*internal> \iffalse %</internal> @@ -63,9 +63,9 @@ http://www.latex-project.org/lppl.txt \expandafter\endgroup \fi %</internal> -% \fi +%\fi % -% \iffalse +%\iffalse %<*driver> ^^A ---------- file headers ------------------------------------------------- \ProvidesFile{HsH-classes.dtx} %</driver> @@ -74,66 +74,66 @@ http://www.latex-project.org/lppl.txt %<report>\ProvidesClass{HsH-report} %<standalone>\ProvidesClass{HsH-standalone} %<*article|report|standalone> - [2024-04-25 3.01 HsH-class based on KOMA] + [2024-04-25 3.01 HsH-class based on KOMA] %</article|report|standalone> %<*driver> ^^A ---------- documentation driver ----------------------------------------- - \documentclass{ltxdoc} - \usepackage{doc}[2022-06-01] - \usepackage[a4paper,margin=25mm,left=50mm,nohead]{geometry} - \usepackage[numbered]{hypdoc} - \usepackage[style=ddmmyyyy,datesep={.}]{datetime2} - \usepackage{scrlogo} - % - \NewDocElement[idxgroup=classes]{Class}{class} - \NewDocElement{Option}{option} - \providecommand\opt{\texttt} - \newenvironment{options}% - {\begin{list}{}{% - \renewcommand{\makelabel}[1]{\opt{##1}\hfil}% - \setlength{\itemsep}{-.5\parsep} - \settowidth{\labelwidth}{\texttt{xxxxxxxxx\space}}% - \setlength{\leftmargin}{\labelwidth}% - \addtolength{\leftmargin}{\labelsep}}% - \raggedright} - {\end{list}} - \newenvironment{packages}% - {\begin{list}{}{% - \renewcommand{\makelabel}[1]{\pkg{##1}\hfil}% - \setlength{\itemsep}{-.5\parsep} - \settowidth{\labelwidth}{\texttt{xxxxxxx\space}}% - \setlength{\leftmargin}{\labelwidth}% - \addtolength{\leftmargin}{\labelsep}}% - \raggedright} - {\end{list}} - \newenvironment{note}[1]{\begin{quote}\textbf{Note:}\;#1}{\end{quote}} - \def\paragraph#1{\bigskip\textbf{#1}\\} - \newcommand\OR{\kern1pt{|}\kern1pt} - % - \renewcommand{\familydefault}{\sfdefault} - \setlength\parindent{0pt} - \setcounter{IndexColumns}{2} - \setlength\marginparsep{2\labelsep} - % - \EnableCrossrefs - \RecordChanges - % - \GetFileInfo{\jobname.dtx} - \title{ - \textsf{HsH-Classes} --- A set of \LaTeX{} classes for use in Hochschule Hannover - \thanks{This file describes version \fileversion, last revised \filedate.} - } - \author{Jan Wille\thanks{E-mail: mail@janiwlle.de}} - \MaintainedBy{Maintained on \url{https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh}} - \date{Printed \today} - \begin{document} - \maketitle - \begin{multicols}{2} - \tableofcontents - \end{multicols} - \DocInput{\jobname.dtx} - \end{document} +\documentclass{ltxdoc} +\usepackage{doc}[2022-06-01] +\usepackage[a4paper,margin=25mm,left=50mm,nohead]{geometry} +\usepackage[numbered]{hypdoc} +\usepackage[style=ddmmyyyy,datesep={.}]{datetime2} +\usepackage{scrlogo} +% +\NewDocElement[idxgroup=classes]{Class}{class} +\NewDocElement{Option}{option} +\providecommand\opt{\texttt} +\newenvironment{options}% + {\begin{list}{}{% + \renewcommand{\makelabel}[1]{\opt{##1}\hfil}% + \setlength{\itemsep}{-.5\parsep} + \settowidth{\labelwidth}{\texttt{xxxxxxxxx\space}}% + \setlength{\leftmargin}{\labelwidth}% + \addtolength{\leftmargin}{\labelsep} + }\raggedright} + {\end{list}} +\newenvironment{packages}% + {\begin{list}{}{% + \renewcommand{\makelabel}[1]{\pkg{##1}\hfil}% + \setlength{\itemsep}{-.5\parsep} + \settowidth{\labelwidth}{\texttt{xxxxxxx\space}}% + \setlength{\leftmargin}{\labelwidth}% + \addtolength{\leftmargin}{\labelsep} + }\raggedright} + {\end{list}} +\newenvironment{note}[1]{\begin{quote}\textbf{Note:}\;#1}{\end{quote}} +\def\paragraph#1{\bigskip\textbf{#1}\\} +\newcommand\OR{\kern1pt{|}\kern1pt} +% +\renewcommand{\familydefault}{\sfdefault} +\setlength\parindent{0pt} +\setcounter{IndexColumns}{2} +\setlength\marginparsep{2\labelsep} +% +\EnableCrossrefs +\RecordChanges +% +\GetFileInfo{\jobname.dtx} +\title{ + \textsf{HsH-Classes} --- A set of \LaTeX{} classes for use in Hochschule Hannover + \thanks{This file describes version \fileversion, last revised \filedate.} +} +\author{Jan Wille\thanks{E-mail: mail@janiwlle.de}} +\MaintainedBy{Maintained on \url{https://lab.it.hs-hannover.de/qxx-tul-u1/latex-template-hsh}} +\date{Printed \today} +\begin{document} + \maketitle + \begin{multicols}{2} + \tableofcontents + \end{multicols} + \DocInput{\jobname.dtx} +\end{document} %</driver> -% \fi +%\fi % %^^A ---------- change log ------------------------------------------------------------- %\changes{v1.00}{2021-11-09}{Initial Version. Official first release} @@ -142,339 +142,339 @@ http://www.latex-project.org/lppl.txt % %^^A ---------- document body ---------------------------------------------------------- % -% \vspace{2\baselineskip} -% \begin{abstract} -% The following documents a set of \LaTeX{} classes created for the Hochschule Hannover. -% They are intended to ease the workflow when writing documents by providing a common -% formating basis that should work for pretty much everything a studend will be expected -% to write. This can be simple one-paged documents, excercises, lab-reports, papers or -% bachelors and masters thesises. -% -% The classes provide interfaces to modify commend requriements, provide commands to get -% specifics like the logo and provide and pre-configure comonly needed packages. This -% should get you going imidealty and reduce the setuptime significantly. -% \end{abstract} -% -% -% \clearpage -% \section{The different classes} -% -% The project classes provided by the Project all carry the |HsH-| prefix. Here is a -% list of the available classes and some expleantion on when to use which class. -% \begin{description} -% \item\DescribeClass{HsH-article} -% A article-class based on \KOMAScript{}s \cls{scrartcl}. -% It is designed for quick and compact documents and is useful for writing -% lab-protocols and alike. It does not have chapters and therefore never -% breaks to a new page on its own. -% \item\DescribeClass{HsH-report} -% A report-class based on \KOMAScript{}s \cls{scrreprt}. -% This is probably the most useful class, as it can be used for a wide -% variety of documents (beginning with lab-reports and ending at complete -% thesis). The line between article and report is somewhat blurry, so use -% as you see fit. -% \item\DescribeClass{HsH-standalone} -% A helper class based based on the \cls{standalone} -% class. It is designed only for creating images as separate documents to -% keep things organized and compiler times low. It is useful for creating -% graphs, circuit diagrams or other kind of complex sub documents. -% \end{description} -% -% \section{Document options} -% To configure the behavior and style of documents using this class, options can be -% passed via the |\documentclass|\oarg{options}\marg{document-class} command. -% -% It should be noted that all unknown keys will pe passed to the parrent class and a -% log-message issued. -% -% \subsection{Generic options share by all classes} -% These Options are avalable regardless of documentclass and modify common things. -% -% \DescribeOption{fontfamily} \DescribeOption{sans}\DescribeOption{roman} -% The \opt{fontfamily=\meta{opt}} option configures which font-style is used. -% For convenience there are also short-forms providet. -% The avalable options are: -% \begin{options} -% \item[sans\OR sans-serif] A sans-serif font is used (similar to Arial) -% \item[roman\OR serif] A serif font is udes (similar to Times-new-Roman) -% \end{options} -% -% \DescribeOption{language} \DescribeOption{english}\DescribeOption{german} -% The \opt{language=\meta{opt}} option set the main language you write in. It ensures -% texts like auto-generated headings are localised properly. -% You can pass in any language-name understood by the \pkg{babel} package. German is -% the default. -% For convenience there are also short-forms providet. -% -% \medskip -% \DescribeOption{todos} -% The \opt{todos} option is a simple switch that activates support for the -% \pkg{todonotes} package. It enables/\-disables the package as well as increasing -% the pagewidth to make space for the notes. -% -% You can use the commands from the package to make notes and other anotations -% (similar to how MS-Words comments work). When you pass \opt{off\OR false} all the -% anotation will disaper from the PDF while still beeing in the source. -% \begin{note} -% setting \opt{todos=off} after having used the option will mostlikly produce -% compilation errors. These will go away after you remove the temporary files. -% \end{note} -% -% \subsection{Options for modifying the document} -% The following options are only avalable for documents (so not utility classes). -% -% \DescribeOption{linespacing} -% \DescribeOption{singlespacing}\DescribeOption{onehalfspacing}\DescribeOption{doublespacing} -% The \opt{linespacing=\meta{opt}} option configures the spacing in beween lines. -% For convenience there are also short-forms providet. -% The avalable options are: -% \begin{options} -% \item[single] No additional space is added in between lines. -% \item[onehalf] Aproximalty half a line of empty space is added inbetween lines. -% \item[double] About a full linehight is left in between lines. -% \end{options} -% -% \DescribeOption{parskip} -% The \opt{parskip=\meta{opt}} option configures the spacing in beween paragraphs. -% This is a option originally implemented by \KOMAScript{} (see \href{http://mirrors.ctan.org/macros/latex/contrib/koma-script/doc/scrguide-en.pdf?page=239#table.3.7}{its manual}) -% so all its options apply. The class only adds additional options. \par -% For you convinience the relevant options are also listed here: -% -% \begin{options} -% \item[false\OR off] Paragraphs are identified by indentation of the first line by -% 1\,em. There is no spacing requirement at the end of the last line of a -% paragraph. -% \item[full\OR true\OR on] Paragraphs are identified by a vertical space of one line -% between paragraphs. There must be at least 1\,em of free space at the end of -% the last line of the paragraph. -% \item[full-] Paragraphs are identified by a vertical space of one line between -% paragraphs. There is no spacing requirement at the end of the last line of a -% paragraph. -% \item[full+] Paragraphs are identified by a vertical space of one line between -% paragraphs. There must be at least a third of a line of free space at the end -% of a paragraph. -% \item[full*] Paragraphs are identified by a vertical space of one line between -% paragraphs. There must be at least a quarter of a line of free space at the -% end of a paragraph. -% \item[half] Paragraphs are identified by a vertical space of half a line between -% paragraphs. There must be at least 1\,em free space at the end of the last -% line of a paragraph. -% \item[half-] Paragraphs are identified by a vertical space of half a line between -% paragraphs. There is no spacing requirement at the end of the last line of a -% paragraph. -% \item[half+] Paragraphs are identified by a vertical space of half a line between -% paragraphs. There must be at least a third of a line of free space at the end -% of a paragraph. -% \item[half*] Paragraphs are identified by a vertical space of half a line between -% paragraphs. There must be at least a quarter of a line of free space at the -% end of a paragraph. -% \item[never] No inter-paragraph spacing will be inserted even if additional -% vertical spacing is needed for vertical adjustment with |\flushbottom|. -% \item[never+] No inter-paragraph spacing will be inserted. There must be at least a -% third of a line of free space at the end of a paragraph. -% \item[never*] No inter-paragraph spacing will be inserted. There must be at least a -% quarter of a line of free space at the end of a paragraph. -% \end{options} -% -% -% \DescribeOption{headheight} -% The \opt{headheight=\meta{dim}} option allows you to set the required size of the -% header. You may need to modify this if you get a |\headheight|\emph{ to low} error -% message. The emssage should tell you what value you need, but you can pass any -% valid length. -% -% \paragraph{Often relevant \KOMAScript\ options} -% The following options are implemented by the parrent classes and only listed here -% for completness. For more detils, see \href{http://mirrors.ctan.org/macros/latex/contrib/koma-script/doc/scrguide-en.pdf?page=239#chapter.3}{its manual}. -% \smallskip -% -% \DescribeOption{fontsize} -% The \opt{fontsize=\meta{size}} options takes a size in \opt{pt}. It is usually in therange of -% 10-12, but other sizes can work as well. -% -% \DescribeOption{paper} -% The \opt{paper=\meta{size}} options accepts a number of options, most ISO formats -% are supported, but also others like \opt{letter} or \opt{legal}. -% -% \DescribeOption{twoside} -% The \opt{twoside} option sets your document up for doublesided printing. The header -% and footer will take this into account and binding-correction will be applide along -% the inner edge. -% -% \DescribeOption{BCOR} -% The \opt{BCOR=}\meta{dim} option allows you to define a custom binding-correction. -% Any valid length can be put here, but to large of a value will shrink the outer -% margin to a not-desirable level. -% -% -% \subsection{Standalone specific options} -% The \cls{standalone} utillity class has some special options which are documented -% here. -% \smallskip -% -% \DescribeOption{margin} -% The \opt{margin=}\meta{dim} option controlls how much whicspace is added arround -% you standalone document. This usually looks better which is why the default is -% 0.25\,cm, but you can supress it by passing 0\,cm. -% -% \DescribeOption{multi} -% The \opt{multi=}\meta{opt} option defines which enviroment make up a page. It can -% be passe more than once. -% -% -% \section{Provided commands} -% The clases define a set of commands which are explained in the following section. -% -% \DescribeMacro{\HsHClassName} -% Each class defines the macro |\HsHClassName| to contain its classname. This is -% mostly usefull so internals can reuse the classname, but you could also check -% against it if you needed to. -% -% \subsection{Title matters} -% \LaTeX{} has a set of default commands which are used to define data for the -% titlepage, like |\title| or |\author|. The classes define a few additional -% commands, which are documented her. -% \smallskip -% -% \DescribeMacro{\matrikelnr} -% The |\matrikelnr|\marg{nr[, ..]} macro sets the matrikelnumber of the author(s). -% It can be a single number or a comma seperated list of numbers. The numbers will -% be matched to the authors passed into |\author|. -% -% \DescribeMacro{\professor} -% You can pass any text to |\professor|\marg{text}, it will be printed on the -% bottom of the titelpage. -% -% \DescribeMacro{\keywords} -% This macro can be used to define keywords which are relevant to your document. -% They will be printed as part of the abstract and be put into the PDF's meta-data. -% -% \paragraph{Modifying the Logo} -% \DescribeMacro{\HsHlogoPath} -% The logo is loaded from a file whos name is read from \cmd{\HsHlogoPath}. Change -% it to use a different logo-file. -% -% \DescribeMacro{\HsHlogoPage} -% As the PDF file can hae multiple pages, the \cmd{\HsHlogoPage} command stores -% which page to load. -% -% \DescribeMacro{\includeHsHlogohere} -% The macro \cmd{\includeHsHlogohere\oarg{width}} is used by |\maketitle| to produce -% the logo. But if you want it elsewhere, you cann call this macro yourself. -% -% -% \subsection{Commands for document writing} -% The following commands will be usefull to you when writing a document. -% \smallskip -% -% \DescribeMacro{\declarationofauthorship} -% The command |\declarationofauthorship|\oarg{align} can be used to print a -% "declatation of authorship" in the current location, similar to how -% |tableofcontens| and friends work. -% -% It will produce a horizontal line, a text block containing the regulatory text and -% a signature block for every author. The command is localised for both english and -% german. Using the optional argument, you can define the positioning. Pass \opt{t} -% for alignment at the top of the page and \opt{b} for bottom alignment -% (\emph{default}). -% -% \smallskip -% The three commands \cmd{\frontmatter},\cmd{\mainmatter} and \cmd{\backmatter} are -% provided for \cls{report} classes. They seperate document section and -% automatically set up pagenumer styles. \par -% \DescribeMacro{\frontmatter} -% \cmd{\frontmatter} set the pagenumers to capital roman numerals. This is usually -% required for everything before the first chapter. \par -% \DescribeMacro{\mainmatter} -% \cmd{\mainmatter} sets the pagenumbering to "normal" arabic numbers. This is -% usually the style for the document content. \par -% \DescribeMacro{\backmatter} -% \cmd{\backmatter} can be used for apendixes and alike. It sets the pagenumbering -% to small roman numerals. -% -% -% \subsection{Default \LaTeX{} Commands that are modified} -% Additionaly, some of \LaTeX{}s default commands are moddified to better fit this -% class. This is documented here. -% -% \DescribeMacro{\title} -% The \cmd{\title\oarg{short-title}\marg{title}} command now takes an additional, -% optional argument. You can use it for a shorter version of your title, that will -% be used in the header to save on space. -% -% \DescribeMacro{\maketitle} -% The |\maketilte| command if \LaTeX{} default way to create a titlepage. We -% redefine it to produce a titlepage that matches the sytel typically used on the -% Hochschle Hannover. This incudes the logo beeing printed, depending on the -% \opt{f1} to \opt{f5} documentoptions. \par -% The command now also takes an options alignment-parameter: -% |\maketitle|\oarg{align}. You can pass \opt{l\OR c\OR r} to get \emph{left}, -% \emph{center} or \emph{right} alignment. -% -% -% \section{Package laoding} -% The classes load some packges for internal use as well as loading and configuring -% common use packages. The details are documented in the following section. -% -% \subsection{Allways loaded packages} -% \begin{packages} -% \item[fontenc] for output encoding, set to the european characterset -% \item[babel] for langauge-specific typesetting -% \item[bookmark] creates bookmoarks in the PDF -% \item[hyperref] for easy referencing and linking -% \item[caption] to customize captions and make references point to the beginning -% of the floats -% \item[graphicx] for importing and manipultating images -% \item[amsmath,amssymb,amsfonts] more options when typesetting math -% \item[lmodern] sets up the Latin-Modern font -% \item[setspace] used for configuring linespacing -% \end{packages} -% -% There are also some packages for internal functionalaty that shouln't conserne the -% user, but they are listed here for completness. -% \begin{packages} -% \item[scrbase] -% \item[pgffor] -% \end{packages} -% -% \subsection{Conditionally loaded Packages} -% A subset of packages is only loaded (or loaded with specifig options) depending -% on options passed to the package -% \begin{packages} -% \item[babel] gets configured depending on \opt{language} -% \item[csquotes] for language-specific quotations marks -% \item[ziffer] only loaded for german documents, sets comma as decimal seperatior -% \item[todonotes] loaded depending on \opt{todos} -% \end{packages} -% -% \subsection{Pre-configured Packages} -% These packages are coonfigured by the class to work in a cooperative way. The -% user must load them in this preable via |\usepackage|\marg{pkg-name} however, as -% loading them allways bears additional, unnecicary overhead. -% -% -%\StopEventually{^^A -% \PrintChanges -% \PrintIndex -%} -% -% \section{Implementation} +%\vspace{2\baselineskip} +%\begin{abstract} +% The following documents a set of \LaTeX{} classes created for the Hochschule Hannover. +% They are intended to ease the workflow when writing documents by providing a common +% formating basis that should work for pretty much everything a studend will be expected +% to write. This can be simple one-paged documents, excercises, lab-reports, papers or +% bachelors and masters thesises. +% +% The classes provide interfaces to modify commend requriements, provide commands to get +% specifics like the logo and provide and pre-configure comonly needed packages. This +% should get you going imidealty and reduce the setuptime significantly. +%\end{abstract} +% +% +%\clearpage +%\section{The different classes} +% +% The project classes provided by the Project all carry the |HsH-| prefix. Here is a +% list of the available classes and some expleantion on when to use which class. +% \begin{description} +% \item\DescribeClass{HsH-article} +% A article-class based on \KOMAScript{}s \cls{scrartcl}. +% It is designed for quick and compact documents and is useful for writing +% lab-protocols and alike. It does not have chapters and therefore never +% breaks to a new page on its own. +% \item\DescribeClass{HsH-report} +% A report-class based on \KOMAScript{}s \cls{scrreprt}. +% This is probably the most useful class, as it can be used for a wide +% variety of documents (beginning with lab-reports and ending at complete +% thesis). The line between article and report is somewhat blurry, so use +% as you see fit. +% \item\DescribeClass{HsH-standalone} +% A helper class based based on the \cls{standalone} +% class. It is designed only for creating images as separate documents to +% keep things organized and compiler times low. It is useful for creating +% graphs, circuit diagrams or other kind of complex sub documents. +% \end{description} +% +%\section{Document options} +% To configure the behavior and style of documents using this class, options can be +% passed via the |\documentclass|\oarg{options}\marg{document-class} command. +% +% It should be noted that all unknown keys will pe passed to the parrent class and a +% log-message issued. +% +% \subsection{Generic options share by all classes} +% These Options are avalable regardless of documentclass and modify common things. +% +% \DescribeOption{fontfamily} \DescribeOption{sans}\DescribeOption{roman} +% The \opt{fontfamily=\meta{opt}} option configures which font-style is used. +% For convenience there are also short-forms providet. +% The avalable options are: +% \begin{options} +% \item[sans\OR sans-serif] A sans-serif font is used (similar to Arial) +% \item[roman\OR serif] A serif font is udes (similar to Times-new-Roman) +% \end{options} +% +% \DescribeOption{language} \DescribeOption{english}\DescribeOption{german} +% The \opt{language=\meta{opt}} option set the main language you write in. It ensures +% texts like auto-generated headings are localised properly. +% You can pass in any language-name understood by the \pkg{babel} package. German is +% the default. +% For convenience there are also short-forms providet. +% +% \medskip +% \DescribeOption{todos} +% The \opt{todos} option is a simple switch that activates support for the +% \pkg{todonotes} package. It enables/\-disables the package as well as increasing +% the pagewidth to make space for the notes. +% +% You can use the commands from the package to make notes and other anotations +% (similar to how MS-Words comments work). When you pass \opt{off\OR false} all the +% anotation will disaper from the PDF while still beeing in the source. +% \begin{note} +% setting \opt{todos=off} after having used the option will mostlikly produce +% compilation errors. These will go away after you remove the temporary files. +% \end{note} +% +% \subsection{Options for modifying the document} +% The following options are only avalable for documents (so not utility classes). +% +% \DescribeOption{linespacing} +% \DescribeOption{singlespacing}\DescribeOption{onehalfspacing}\DescribeOption{doublespacing} +% The \opt{linespacing=\meta{opt}} option configures the spacing in beween lines. +% For convenience there are also short-forms providet. +% The avalable options are: +% \begin{options} +% \item[single] No additional space is added in between lines. +% \item[onehalf] Aproximalty half a line of empty space is added inbetween lines. +% \item[double] About a full linehight is left in between lines. +% \end{options} +% +% \DescribeOption{parskip} +% The \opt{parskip=\meta{opt}} option configures the spacing in beween paragraphs. +% This is a option originally implemented by \KOMAScript{} (see \href{http://mirrors.ctan.org/macros/latex/contrib/koma-script/doc/scrguide-en.pdf?page=239#table.3.7}{its manual}) +% so all its options apply. The class only adds additional options. \par +% For you convinience the relevant options are also listed here: +% +% \begin{options} +% \item[false\OR off] Paragraphs are identified by indentation of the first line by +% 1\,em. There is no spacing requirement at the end of the last line of a +% paragraph. +% \item[full\OR true\OR on] Paragraphs are identified by a vertical space of one line +% between paragraphs. There must be at least 1\,em of free space at the end of +% the last line of the paragraph. +% \item[full-] Paragraphs are identified by a vertical space of one line between +% paragraphs. There is no spacing requirement at the end of the last line of a +% paragraph. +% \item[full+] Paragraphs are identified by a vertical space of one line between +% paragraphs. There must be at least a third of a line of free space at the end +% of a paragraph. +% \item[full*] Paragraphs are identified by a vertical space of one line between +% paragraphs. There must be at least a quarter of a line of free space at the +% end of a paragraph. +% \item[half] Paragraphs are identified by a vertical space of half a line between +% paragraphs. There must be at least 1\,em free space at the end of the last +% line of a paragraph. +% \item[half-] Paragraphs are identified by a vertical space of half a line between +% paragraphs. There is no spacing requirement at the end of the last line of a +% paragraph. +% \item[half+] Paragraphs are identified by a vertical space of half a line between +% paragraphs. There must be at least a third of a line of free space at the end +% of a paragraph. +% \item[half*] Paragraphs are identified by a vertical space of half a line between +% paragraphs. There must be at least a quarter of a line of free space at the +% end of a paragraph. +% \item[never] No inter-paragraph spacing will be inserted even if additional +% vertical spacing is needed for vertical adjustment with |\flushbottom|. +% \item[never+] No inter-paragraph spacing will be inserted. There must be at least a +% third of a line of free space at the end of a paragraph. +% \item[never*] No inter-paragraph spacing will be inserted. There must be at least a +% quarter of a line of free space at the end of a paragraph. +% \end{options} +% +% +% \DescribeOption{headheight} +% The \opt{headheight=\meta{dim}} option allows you to set the required size of the +% header. You may need to modify this if you get a |\headheight|\emph{ to low} error +% message. The emssage should tell you what value you need, but you can pass any +% valid length. +% +% \paragraph{Often relevant \KOMAScript\ options} +% The following options are implemented by the parrent classes and only listed here +% for completness. For more detils, see \href{http://mirrors.ctan.org/macros/latex/contrib/koma-script/doc/scrguide-en.pdf?page=239#chapter.3}{its manual}. +% \smallskip +% +% \DescribeOption{fontsize} +% The \opt{fontsize=\meta{size}} options takes a size in \opt{pt}. It is usually in therange of +% 10-12, but other sizes can work as well. +% +% \DescribeOption{paper} +% The \opt{paper=\meta{size}} options accepts a number of options, most ISO formats +% are supported, but also others like \opt{letter} or \opt{legal}. +% +% \DescribeOption{twoside} +% The \opt{twoside} option sets your document up for doublesided printing. The header +% and footer will take this into account and binding-correction will be applide along +% the inner edge. +% +% \DescribeOption{BCOR} +% The \opt{BCOR=}\meta{dim} option allows you to define a custom binding-correction. +% Any valid length can be put here, but to large of a value will shrink the outer +% margin to a not-desirable level. +% +% +% \subsection{Standalone specific options} +% The \cls{standalone} utillity class has some special options which are documented +% here. +% \smallskip +% +% \DescribeOption{margin} +% The \opt{margin=}\meta{dim} option controlls how much whicspace is added arround +% you standalone document. This usually looks better which is why the default is +% 0.25\,cm, but you can supress it by passing 0\,cm. +% +% \DescribeOption{multi} +% The \opt{multi=}\meta{opt} option defines which enviroment make up a page. It can +% be passe more than once. +% +% +%\section{Provided commands} +% The clases define a set of commands which are explained in the following section. +% +% \DescribeMacro{\HsHClassName} +% Each class defines the macro |\HsHClassName| to contain its classname. This is +% mostly usefull so internals can reuse the classname, but you could also check +% against it if you needed to. +% +% \subsection{Title matters} +% \LaTeX{} has a set of default commands which are used to define data for the +% titlepage, like |\title| or |\author|. The classes define a few additional +% commands, which are documented her. +% \smallskip +% +% \DescribeMacro{\matrikelnr} +% The |\matrikelnr|\marg{nr[, ..]} macro sets the matrikelnumber of the author(s). +% It can be a single number or a comma seperated list of numbers. The numbers will +% be matched to the authors passed into |\author|. +% +% \DescribeMacro{\professor} +% You can pass any text to |\professor|\marg{text}, it will be printed on the +% bottom of the titelpage. +% +% \DescribeMacro{\keywords} +% This macro can be used to define keywords which are relevant to your document. +% They will be printed as part of the abstract and be put into the PDF's meta-data. +% +% \paragraph{Modifying the Logo} +% \DescribeMacro{\HsHlogoPath} +% The logo is loaded from a file whos name is read from \cmd{\HsHlogoPath}. Change +% it to use a different logo-file. +% +% \DescribeMacro{\HsHlogoPage} +% As the PDF file can hae multiple pages, the \cmd{\HsHlogoPage} command stores +% which page to load. +% +% \DescribeMacro{\includeHsHlogohere} +% The macro \cmd{\includeHsHlogohere\oarg{width}} is used by |\maketitle| to produce +% the logo. But if you want it elsewhere, you cann call this macro yourself. +% +% +% \subsection{Commands for document writing} +% The following commands will be usefull to you when writing a document. +% \smallskip +% +% \DescribeMacro{\declarationofauthorship} +% The command |\declarationofauthorship|\oarg{align} can be used to print a +% "declatation of authorship" in the current location, similar to how +% |tableofcontens| and friends work. +% +% It will produce a horizontal line, a text block containing the regulatory text and +% a signature block for every author. The command is localised for both english and +% german. Using the optional argument, you can define the positioning. Pass \opt{t} +% for alignment at the top of the page and \opt{b} for bottom alignment +% (\emph{default}). +% +% \smallskip +% The three commands \cmd{\frontmatter},\cmd{\mainmatter} and \cmd{\backmatter} are +% provided for \cls{report} classes. They seperate document section and +% automatically set up pagenumer styles. \par +% \DescribeMacro{\frontmatter} +% \cmd{\frontmatter} set the pagenumers to capital roman numerals. This is usually +% required for everything before the first chapter. \par +% \DescribeMacro{\mainmatter} +% \cmd{\mainmatter} sets the pagenumbering to "normal" arabic numbers. This is +% usually the style for the document content. \par +% \DescribeMacro{\backmatter} +% \cmd{\backmatter} can be used for apendixes and alike. It sets the pagenumbering +% to small roman numerals. +% +% +% \subsection{Default \LaTeX{} Commands that are modified} +% Additionaly, some of \LaTeX{}s default commands are moddified to better fit this +% class. This is documented here. +% +% \DescribeMacro{\title} +% The \cmd{\title\oarg{short-title}\marg{title}} command now takes an additional, +% optional argument. You can use it for a shorter version of your title, that will +% be used in the header to save on space. +% +% \DescribeMacro{\maketitle} +% The |\maketilte| command if \LaTeX{} default way to create a titlepage. We +% redefine it to produce a titlepage that matches the sytel typically used on the +% Hochschle Hannover. This incudes the logo beeing printed, depending on the +% \opt{f1} to \opt{f5} documentoptions. \par +% The command now also takes an options alignment-parameter: +% |\maketitle|\oarg{align}. You can pass \opt{l\OR c\OR r} to get \emph{left}, +% \emph{center} or \emph{right} alignment. +% +% +%\section{Package laoding} +% The classes load some packges for internal use as well as loading and configuring +% common use packages. The details are documented in the following section. +% +% \subsection{Allways loaded packages} +% \begin{packages} +% \item[fontenc] for output encoding, set to the european characterset +% \item[babel] for langauge-specific typesetting +% \item[bookmark] creates bookmoarks in the PDF +% \item[hyperref] for easy referencing and linking +% \item[caption] to customize captions and make references point to the beginning +% of the floats +% \item[graphicx] for importing and manipultating images +% \item[amsmath,amssymb,amsfonts] more options when typesetting math +% \item[lmodern] sets up the Latin-Modern font +% \item[setspace] used for configuring linespacing +% \end{packages} +% +% There are also some packages for internal functionalaty that shouln't conserne the +% user, but they are listed here for completness. +% \begin{packages} +% \item[scrbase] +% \item[pgffor] +% \end{packages} +% +% \subsection{Conditionally loaded Packages} +% A subset of packages is only loaded (or loaded with specifig options) depending +% on options passed to the package +% \begin{packages} +% \item[babel] gets configured depending on \opt{language} +% \item[csquotes] for language-specific quotations marks +% \item[ziffer] only loaded for german documents, sets comma as decimal seperatior +% \item[todonotes] loaded depending on \opt{todos} +% \end{packages} +% +% \subsection{Pre-configured Packages} +% These packages are coonfigured by the class to work in a cooperative way. The +% user must load them in this preable via |\usepackage|\marg{pkg-name} however, as +% loading them allways bears additional, unnecicary overhead. +% +% +% \StopEventually{^^A +% \PrintChanges +% \PrintIndex +% } +% +%\section{Implementation} % %\iffalse docstrip-guard %<*article|report|standalone> %\fi % -% \subsection{Internal commands} -% \begin{macro}{\HsHClassName} -% The classname of specific class is stored in the |\HsHClassName| which gets used -% throuout the code. +% \subsection{Internal commands} +% \begin{macro}{\HsHClassName} +% The classname of specific class is stored in the |\HsHClassName| which gets used +% throuout the code. % \begin{macrocode} \let\HsHClassName\@currname % \end{macrocode} -% \end{macro} +% \end{macro} % -% There is also a second macro |\HsHClassName@ParrentClass| which stores the parrent -% classes name. +% There is also a second macro |\HsHClassName@ParrentClass| which stores the parrent +% classes name. % \begin{macrocode} \def\HsHClassName@ParrentClass{% %<article> scrartcl% @@ -484,149 +484,149 @@ http://www.latex-project.org/lppl.txt % \end{macrocode} % % -% \subsection{Option handeling} -% The options are handled using featues provieded by the |KOMA|-Script ecosystem. -% To get access to this the \pkg{srcbase} package is loaded. +% \subsection{Option handeling} +% The options are handled using featues provieded by the |KOMA|-Script ecosystem. +% To get access to this the \pkg{srcbase} package is loaded. % \begin{macrocode} \RequirePackage{scrbase} % \end{macrocode} % -% We also require some packages for some of the option, these are loaded next. +% We also require some packages for some of the option, these are loaded next. % \begin{macrocode} \RequirePackage{setspace} % \end{macrocode} % -% A new familiy of keys is created and shared by all elelments of this project. -% For that the |\DefineFamily| macro is used. The familiy name is \emph{HsH}, -% matching the usual prefixes. +% A new familiy of keys is created and shared by all elelments of this project. +% For that the |\DefineFamily| macro is used. The familiy name is \emph{HsH}, +% matching the usual prefixes. % \begin{macrocode} \DefineFamily{HsH} % \end{macrocode} -% Additionally each class-file represents a member in the family. This is defined -% using the |\DefineFamilyMember| macro. It's optional argument is set to the current -% filename by default, so we do not need to specify it, just the family name to -% attatch it to. +% Additionally each class-file represents a member in the family. This is defined +% using the |\DefineFamilyMember| macro. It's optional argument is set to the current +% filename by default, so we do not need to specify it, just the family name to +% attatch it to. % \begin{macrocode} \DefineFamilyMember{HsH} % \end{macrocode} % -% \begin{macro}{\HsH@Options@PassToParrent} -% To be able to pass options to the parrent class wehre needed easiely, a command is -% defined. It also issues a log-message. +% \begin{macro}{\HsH@Options@PassToParrent} +% To be able to pass options to the parrent class wehre needed easiely, a command is +% defined. It also issues a log-message. % \begin{macrocode} \newcommand{\HsH@Options@PassToParrent}[1]{% \ClassInfoNoLine{\HsHClassName}{passing option to parrent class: #1}% \PassOptionsToClass{#1}{\HsHClassName@ParrentClass}% } % \end{macrocode} -% \end{macro} +% \end{macro} % -% \begin{macro}{\HsH@Options@DeclareAlias} -% It is also usefull to have shot-versions of options. The following commands makes -% it easy to decalare these. +% \begin{macro}{\HsH@Options@DeclareAlias} +% It is also usefull to have shot-versions of options. The following commands makes +% it easy to decalare these. % \begin{macrocode} \newcommand{\HsH@Options@DeclareAlias}[3][HsH]{% \DeclareOption{#2}{\FamilyExecuteOptions{#1}{#3}}% } % \end{macrocode} -% \end{macro} +% \end{macro} % -% \begin{option}{fontfamily} -% The first option to be defined is \opt{fontpamily}. It's defined as a -% \emph{Numerical} key so that it can accept multiple options and map them to a -% switch case. +% \begin{option}{fontfamily} +% The first option to be defined is \opt{fontpamily}. It's defined as a +% \emph{Numerical} key so that it can accept multiple options and map them to a +% switch case. % \begin{macrocode} \DefineFamilyKey{HsH}{fontfamily}{ \begingroup - \FamilySetNumerical{HsH}{parskip}{@tmp}{% - {sans}{0}, {sans-serif}{0},% - {roman}{1}, {serif}{1},% - }{#1} - \ifx\FamilyKeyState\FamilyKeyStateProcessed - \aftergroup\FamilyKeyStateProcessed - \ifcase\@tmp% 0 - \endgroup - \renewcommand{\familydefault}{\sfdefault} - \if@atdocument\AfterKOMAoptions{\selectfont}\fi - \or% 1 - \endgroup - \renewcommand{\familydefault}{\rmdefault} - \if@atdocument\AfterKOMAoptions{\selectfont}\fi - \else% should never be - \endgroup - \fi - \else + \FamilySetNumerical{HsH}{parskip}{@tmp}{% + {sans}{0}, {sans-serif}{0},% + {roman}{1}, {serif}{1},% + }{#1} + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \aftergroup\FamilyKeyStateProcessed + \ifcase\@tmp% 0 + \endgroup + \renewcommand{\familydefault}{\sfdefault} + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \or% 1 + \endgroup + \renewcommand{\familydefault}{\rmdefault} + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \else% should never be \endgroup - \FamilyKeyStateUnknownValue \fi + \else + \endgroup + \FamilyKeyStateUnknownValue + \fi } % \end{macrocode} -% \end{option} +% \end{option} % -% \begin{option}{sans,roman} -% For convinience, there are also two short-versions defined. +% \begin{option}{sans,roman} +% For convinience, there are also two short-versions defined. % \begin{macrocode} \HsH@Options@DeclareAlias{sans}{fontfamily=sans} \HsH@Options@DeclareAlias{roman}{fontfamily=roman} % \end{macrocode} -% \end{option} +% \end{option} % % \begin{macrocode} %<*!standalone> % \end{macrocode} % % -% \begin{option}{linespacing} -% The \opt{linespacing} options is also a \emph{Numerical} option, mapping to three -% cases. They execute the apropriate commands of the \pkg{setspace} package. +% \begin{option}{linespacing} +% The \opt{linespacing} options is also a \emph{Numerical} option, mapping to three +% cases. They execute the apropriate commands of the \pkg{setspace} package. % \begin{macrocode} \DefineFamilyKey{HsH}{linespacing}{ \begingroup - \FamilySetNumerical{HsH}{linespacing}{@tempa}{% - {single}{0},% - {onehalf}{1},% - {double}{2},% - }{#1} - \ifx\FamilyKeyState\FamilyKeyStateProcessed - \aftergroup\FamilyKeyStateProcessed - \ifcase\@tempa% 0 - \endgroup - \if@atdocument\singlespacing\else\AtEndOfClass{\singlespacing}\fi - \or% 1 - \endgroup - \if@atdocument\onehalfspacing\else\AtEndOfClass{\onehalfspacing\AfterTOCHead{\singlespacing}}\fi - \or% 2 - \endgroup - \if@atdocument\doublespacing\else\AtEndOfClass{\doublespacing\AfterTOCHead{\singlespacing}}\fi + \FamilySetNumerical{HsH}{linespacing}{@tempa}{% + {single}{0},% + {onehalf}{1},% + {double}{2},% + }{#1} + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \aftergroup\FamilyKeyStateProcessed + \ifcase\@tempa% 0 + \endgroup + \if@atdocument\singlespacing\else\AtEndOfClass{\singlespacing}\fi + \or% 1 + \endgroup + \if@atdocument\onehalfspacing\else\AtEndOfClass{\onehalfspacing\AfterTOCHead{\singlespacing}}\fi + \or% 2 + \endgroup + \if@atdocument\doublespacing\else\AtEndOfClass{\doublespacing\AfterTOCHead{\singlespacing}}\fi - \else% should never be - \endgroup - \fi - \else + \else% should never be \endgroup - \FamilyKeyStateUnknownValue \fi + \else + \endgroup + \FamilyKeyStateUnknownValue + \fi } % \end{macrocode} -% \end{option} +% \end{option} % -% \begin{option}{singlespacing,onehalfspacing,doublespacing} -% For convinience, there are also these short-versions defined. +% \begin{option}{singlespacing,onehalfspacing,doublespacing} +% For convinience, there are also these short-versions defined. % \begin{macrocode} \HsH@Options@DeclareAlias{singlespacing}{linespacing=single} \HsH@Options@DeclareAlias{onehalfspacing}{linespacing=onehalf} \HsH@Options@DeclareAlias{doublespacing}{linespacing=double} % \end{macrocode} -% \end{option} +% \end{option} % % -% \begin{option}{parskip} -% The \opt{parskip} option is special in that ist originally a \KOMAScript{} option -% that get expanded by this class. Only two new cases are defined here and everything -% unknown gets passed to the parrent class. \par -% It should also be noted that this option can't execute its code imidealtly, as the -% commands needed are only defined later when the parrent class loads in. So the -% |\setparsizes| command is pushed into a hook. +% \begin{option}{parskip} +% The \opt{parskip} option is special in that ist originally a \KOMAScript{} option +% that get expanded by this class. Only two new cases are defined here and everything +% unknown gets passed to the parrent class. \par +% It should also be noted that this option can't execute its code imidealtly, as the +% commands needed are only defined later when the parrent class loads in. So the +% |\setparsizes| command is pushed into a hook. % \begin{macrocode} \DefineFamilyKey{HsH}{parskip}{% \begingroup @@ -657,10 +657,10 @@ http://www.latex-project.org/lppl.txt \fi } % \end{macrocode} -% \end{option} +% \end{option} % -% \begin{option}{headheight} -% The \opt{headheight} option just stet the |\headheight| to the given value. +% \begin{option}{headheight} +% The \opt{headheight} option just stet the |\headheight| to the given value. % \begin{macrocode} \def\HsH@opt@headheight{} \FamilyStringKey{HsH}{headheight}{\HsH@opt@headheight} @@ -668,10 +668,10 @@ http://www.latex-project.org/lppl.txt \headheight=\HsH@opt@headheight% } % \end{macrocode} -% \end{option} +% \end{option} % -% For the \opt{twoside} option we only redefine the default, everyting else is -% handled by the parrent class. +% For the \opt{twoside} option we only redefine the default, everyting else is +% handled by the parrent class. % \begin{macrocode} \DefineFamilyKey{HsH}{twoside}[semi]{% \HsH@Options@PassToParrent{twoside=#1,BCOR=1cm} @@ -684,44 +684,44 @@ http://www.latex-project.org/lppl.txt % \end{macrocode} % % -% \begin{macro}{\HsH@opt@language} -% First, the macro to store the languages name in is created. The default is |nil|, -% as \pkg{babel} will see this as no-language. +% \begin{macro}{\HsH@opt@language} +% First, the macro to store the languages name in is created. The default is |nil|, +% as \pkg{babel} will see this as no-language. % \begin{macrocode} \def\HsH@opt@language{nil} % \end{macrocode} -% \end{macro} +% \end{macro} % -% \begin{option}{language} -% The key is than defined to store its value inside the command. This allowes the -% option to be called multiple time, but only the last set value will be passed on to -% \pkg{bable}. +% \begin{option}{language} +% The key is than defined to store its value inside the command. This allowes the +% option to be called multiple time, but only the last set value will be passed on to +% \pkg{bable}. % \begin{macrocode} \FamilyStringKey{HsH}{language}{\HsH@opt@language} % \end{macrocode} -% \end{option} +% \end{option} % -% \begin{option}{english,german, ngerman} -% For convinience, there are also these short-versions defined. +% \begin{option}{english,german, ngerman} +% For convinience, there are also these short-versions defined. % \begin{macrocode} \HsH@Options@DeclareAlias{english}{language=english} \HsH@Options@DeclareAlias{german}{language=ngerman} \HsH@Options@DeclareAlias{ngerman}{language=ngerman} % \end{macrocode} -% \end{option} +% \end{option} % % -% \begin{macro}{\HsH@opt@faculty} -% As we need a default value that is not zero, the macro needs to be defined an -% initalised manually. +% \begin{macro}{\HsH@opt@faculty} +% As we need a default value that is not zero, the macro needs to be defined an +% initalised manually. % \begin{macrocode} \def\HsH@opt@faculty{1} % \end{macrocode} -% \end{macro} +% \end{macro} % -% \begin{option}{faculty} -% The \opt{faculty} options is once again a \emph{Numerical} option, mapping the five -% faculties and storeing the selected one in |\HsH@opt@faculty|. +% \begin{option}{faculty} +% The \opt{faculty} options is once again a \emph{Numerical} option, mapping the five +% faculties and storeing the selected one in |\HsH@opt@faculty|. % \begin{macrocode} \FamilyNumericalKey{HsH}{faculty}{HsH@opt@faculty}{% {0}{1}, {none}{1}, {false}{1}, {off}{1}% @@ -732,10 +732,10 @@ http://www.latex-project.org/lppl.txt {5}{6}, {f5}{6},% } % \end{macrocode} -% \end{option} +% \end{option} % -% \begin{option}{f1,f2,f3,f4,f5} -% For convinience, there are also these short-versions defined. +% \begin{option}{f1,f2,f3,f4,f5} +% For convinience, there are also these short-versions defined. % \begin{macrocode} \HsH@Options@DeclareAlias{f1}{faculty=f1} \HsH@Options@DeclareAlias{f2}{faculty=f2} @@ -743,20 +743,20 @@ http://www.latex-project.org/lppl.txt \HsH@Options@DeclareAlias{f4}{faculty=f4} \HsH@Options@DeclareAlias{f5}{faculty=f5} % \end{macrocode} -% \end{option} +% \end{option} % -% \begin{option}{todos} -% The boolean option \opt{todos} is simply created using the commands from \pkg{scrbase}. -% Boolean options allready default to \meta{true} if called without and argument, so -% no need to define an explicit alias. +% \begin{option}{todos} +% The boolean option \opt{todos} is simply created using the commands from \pkg{scrbase}. +% Boolean options allready default to \meta{true} if called without and argument, so +% no need to define an explicit alias. % \begin{macrocode} \FamilyBoolKey{HsH}{todos}{@todos} % \end{macrocode} -% \end{option} +% \end{option} % -% For the \cls{standalone} class the \opt{fontsize} option is mocked to present a -% standardised interface. A user might expect this option to be passable to this -% class and we shoulnd crete an anoying error just for this. +% For the \cls{standalone} class the \opt{fontsize} option is mocked to present a +% standardised interface. A user might expect this option to be passable to this +% class and we shoulnd crete an anoying error just for this. % \begin{macrocode} %<*standalone> \DefineFamilyKey{HsH}{fontsize}{% @@ -766,11 +766,11 @@ http://www.latex-project.org/lppl.txt %</standalone> % \end{macrocode} % -% \subsubsection{Unknown options} -% Unknown options will be passed to the parent class. For that a |@else@| key is -% defined on the |HsH| family, which will be execute for every unknown key-value -% option. Unknown bare options are handled by the |\DeclareOption*| command and will -% be passed there. +% \subsubsection{Unknown options} +% Unknown options will be passed to the parent class. For that a |@else@| key is +% defined on the |HsH| family, which will be execute for every unknown key-value +% option. Unknown bare options are handled by the |\DeclareOption*| command and will +% be passed there. % \begin{macrocode} \DefineFamilyKey{HsH}{@else@}{ \HsH@Options@PassToParrent{#1} @@ -782,9 +782,9 @@ http://www.latex-project.org/lppl.txt % \end{macrocode} % % -% \subsubsection{Default options} -% The different classes all execute a set of default options, which is handled by the -% following code. +% \subsubsection{Default options} +% The different classes all execute a set of default options, which is handled by the +% following code. % \begin{macrocode} \FamilyExecuteOptions{HsH}{% fontfamily=sans-serif, @@ -809,66 +809,66 @@ http://www.latex-project.org/lppl.txt } % \end{macrocode} % -% Now we cann process the options for the |HsH| familiy. +% Now we cann process the options for the |HsH| familiy. % \begin{macrocode} \FamilyProcessOptions{HsH}\relax % \end{macrocode} % -% \subsubsection{Loading the parrent class} +% \subsubsection{Loading the parrent class} % \begin{macrocode} \LoadClass{\HsHClassName@ParrentClass} % \end{macrocode} % % -% \subsection{Package loading} -% The clases load and configure some common packages to reduce the needed amount of -% boilderplate code in your preamble. +% \subsection{Package loading} +% The clases load and configure some common packages to reduce the needed amount of +% boilderplate code in your preamble. % -% Additionally there are settings provided for packages that are used more rarly, but -% will be set up correctly if you decide to load them via |\usepackage{}|. +% Additionally there are settings provided for packages that are used more rarly, but +% will be set up correctly if you decide to load them via |\usepackage{}|. % -% \subsubsection{Ensuring German works} -% With modern LaTeX systems the encoding of inputfiles is UTF-8 by default, so the -% \pkg{inputenc} package is no longer requried. Should the user still use a old -% setup or use a different encoding, he is responsible for loading \pkg{inputenc} -% himself. -% \changes{v3.00}{2024-02-03}{removed the \pkg{inputenc} package, as utf8 is now default} +% \subsubsection{Ensuring German works} +% With modern LaTeX systems the encoding of inputfiles is UTF-8 by default, so the +% \pkg{inputenc} package is no longer requried. Should the user still use a old +% setup or use a different encoding, he is responsible for loading \pkg{inputenc} +% himself. +% \changes{v3.00}{2024-02-03}{removed the \pkg{inputenc} package, as utf8 is now default} % -% The font-encoding for the pdf file is also set up to allow for the full european -% characterset. -% \changes{v3.00}{2024-02-03}{added \pkg{type1ec} package to get better font-scaling} ^^A see https://tex.stackexchange.com/questions/208304 +% The font-encoding for the pdf file is also set up to allow for the full european +% characterset. +% \changes{v3.00}{2024-02-03}{added \pkg{type1ec} package to get better font-scaling} ^^A see https://tex.stackexchange.com/questions/208304 % \begin{macrocode} \RequirePackage[T1]{fontenc} \RequirePackage{type1ec} % \end{macrocode} % -% To ensure localised translations of all displayed text automatically dependign on -% the user-selected \opt{language}, the \pkg{babel} package is loaded. This also -% allowes for the use of the |\iflanguage| command, which is relevant later. +% To ensure localised translations of all displayed text automatically dependign on +% the user-selected \opt{language}, the \pkg{babel} package is loaded. This also +% allowes for the use of the |\iflanguage| command, which is relevant later. % \begin{macrocode} \RequirePackage[main=\HsH@opt@language]{babel} % \end{macrocode} % -% Quotationsmarks are also very different between languages, so the following -% ensures the correct style for the correct language. +% Quotationsmarks are also very different between languages, so the following +% ensures the correct style for the correct language. % \begin{macrocode} \RequirePackage[autostyle=true]{csquotes} \MakeOuterQuote{"} % \end{macrocode} % -% German uses a comma as the decimal separator, which collides with \LaTeX{}s -% default english setting of using the comma as a thousands separator and therefore -% replacing it with some whitespace on printed version. Luckily loading the -% \pkg{ziffer} package sets this up to match the german standart. +% German uses a comma as the decimal separator, which collides with \LaTeX{}s +% default english setting of using the comma as a thousands separator and therefore +% replacing it with some whitespace on printed version. Luckily loading the +% \pkg{ziffer} package sets this up to match the german standart. % \begin{macrocode} \iflanguage{ngerman}{\RequirePackage{ziffer}}{} % \end{macrocode} % % -% \subsubsection{Generally usefull packages} +% \subsubsection{Generally usefull packages} % -% We load \pkg{hyperref} for clikable links and configure it to write meta-date to -% the PDF. +% We load \pkg{hyperref} for clikable links and configure it to write meta-date to +% the PDF. % \begin{macrocode} \RequirePackage[hidelinks]{hyperref} % must load before `bookmarks' \RequirePackage{bookmark} @@ -886,9 +886,9 @@ http://www.latex-project.org/lppl.txt %</!standalone> % \end{macrocode} % -% The \pkg{todonotes} package is greate for anotation, but extremly expensive on -% compiletime. So we load it only if the user requests it. Also its commands are -% stubed, so that they can be left in the sourcecode and jut not output anything. +% The \pkg{todonotes} package is greate for anotation, but extremly expensive on +% compiletime. So we load it only if the user requests it. Also its commands are +% stubed, so that they can be left in the sourcecode and jut not output anything. % \begin{macrocode} \if@todos \PassOptionsToPackage{ @@ -910,16 +910,16 @@ http://www.latex-project.org/lppl.txt \RequirePackage[svgnames]{xcolor} % \end{macrocode} % -% \subsubsection{Options for packages that could be loaded by the user} -% Some package are not always needed and potentially heavy to load in by default. -% But its still usefull to set default options for these packagese. +% \subsubsection{Options for packages that could be loaded by the user} +% Some package are not always needed and potentially heavy to load in by default. +% But its still usefull to set default options for these packagese. % -% These differ from the settings provided in |HsH-classes.cfg| in that they are -% defaults that apply allway and not user-configurable preferences which are user -% or even project specific. +% These differ from the settings provided in |HsH-classes.cfg| in that they are +% defaults that apply allway and not user-configurable preferences which are user +% or even project specific. % -% For the \pkg{bibtex} we ensure the \emph{biber} backend is selcted, which matches -% the settings in |.latexmkrc|. +% For the \pkg{bibtex} we ensure the \emph{biber} backend is selcted, which matches +% the settings in |.latexmkrc|. % \begin{macrocode} %<*article|report> \PassOptionsToPackage{backend=biber}{biblatex} @@ -933,8 +933,8 @@ http://www.latex-project.org/lppl.txt %</article|report> % \end{macrocode} % -% For \pkg{bibtex} we load the free-stadnding units, mostly for backwards compatibility. -% We also ensure german language specific settings are applyed. +% For \pkg{bibtex} we load the free-stadnding units, mostly for backwards compatibility. +% We also ensure german language specific settings are applyed. % \begin{macrocode} \PassOptionsToPackage{free-standing-units}{siunitx} \AtBeginDocument{ @@ -948,8 +948,8 @@ http://www.latex-project.org/lppl.txt } % \end{macrocode} % -% For better compatibility with the \pkg{listings} package we load the -% \pkg{scrhack} package. We also pass some configurations to if if it gets loaded. +% For better compatibility with the \pkg{listings} package we load the +% \pkg{scrhack} package. We also pass some configurations to if if it gets loaded. % \begin{macrocode} \RequirePackage{scrhack} \AtBeginDocument{ @@ -964,15 +964,15 @@ http://www.latex-project.org/lppl.txt } % \end{macrocode} % -% The \pkg{circuitikz} needs bo be configure so it matches typical european styles. +% The \pkg{circuitikz} needs bo be configure so it matches typical european styles. % \begin{macrocode} \PassOptionsToPackage{european,EFvoltages,straightvoltages,betterproportions}{circuitikz} % \end{macrocode} % -% For other packages we provide the settings more as a recomendation of what is -% usefull. As the user might want to change these, we outsource this to a seperat file -% and input it |\AtBeginDocument|. That way the user can just replace the file with his -% custom version. +% For other packages we provide the settings more as a recomendation of what is +% usefull. As the user might want to change these, we outsource this to a seperat file +% and input it |\AtBeginDocument|. That way the user can just replace the file with his +% custom version. % \begin{macrocode} \AtBeginDocument{ \makeatletter @@ -985,88 +985,88 @@ http://www.latex-project.org/lppl.txt } % \end{macrocode} % -% \subsection{Custom commands} +% \subsection{Custom commands} % -% \subsubsection{Document seperation commands} -% The following commands are only defnied for \cls{book} type classes by default. -% But they are also usefull for the \cls{report} class, so we define them in that case. +% \subsubsection{Document seperation commands} +% The following commands are only defnied for \cls{book} type classes by default. +% But they are also usefull for the \cls{report} class, so we define them in that case. % \begin{macrocode} %<*report> % \end{macrocode} % -% \begin{macro}{\if@mainmatter} -% We define a switch which stores if the document is currently at a mainmatter -% section. Ir defaults to |true| as the user needs to explicitly set the state to -% something differnt. +% \begin{macro}{\if@mainmatter} +% We define a switch which stores if the document is currently at a mainmatter +% section. Ir defaults to |true| as the user needs to explicitly set the state to +% something differnt. % \begin{macrocode} \newif\if@mainmatter\@mainmattertrue % \end{macrocode} -% \end{macro} +% \end{macro} % -% As a pagenumber change requires a fresh page, this is ensured first. We also -% need to make sure that on twosided document, the first page is alwasy on the -% left. +% As a pagenumber change requires a fresh page, this is ensured first. We also +% need to make sure that on twosided document, the first page is alwasy on the +% left. % -% \begin{macro}{\frontmatter} -% The pagenumbering is set to capital roman numerals. +% \begin{macro}{\frontmatter} +% The pagenumbering is set to capital roman numerals. % \begin{macrocode} \newcommand{\frontmatter}{ \if@twoside\cleardoubleoddpage\else\clearpage\fi \@mainmatterfalse\pagenumbering{Roman} } % \end{macrocode} -% \end{macro} +% \end{macro} % -% \begin{macro}{\mainmatter} -% The pagenumbering is set to arabic numerals. +% \begin{macro}{\mainmatter} +% The pagenumbering is set to arabic numerals. % \begin{macrocode} \newcommand{\mainmatter}{ \if@twoside\cleardoubleoddpage\else\clearpage\fi \@mainmattertrue\pagenumbering{arabic} } % \end{macrocode} -% \end{macro} +% \end{macro} % -% \begin{macro}{\backmatter} -% The pagenumbering is set to arabic numerals. +% \begin{macro}{\backmatter} +% The pagenumbering is set to arabic numerals. % \begin{macrocode} \newcommand{\backmatter}{ \if@openright\cleardoubleoddpage\else\clearpage\fi \@mainmatterfalse\pagenumbering{roman} } % \end{macrocode} -% \end{macro} +% \end{macro} % % \begin{macrocode} %</report> % \end{macrocode} % % -% \subsubsection{The Logo for Hochschule Hannover} -% The following macros are responsible for creating the logo. They load a specific -% page of a PDF file and siplay it. +% \subsubsection{The Logo for Hochschule Hannover} +% The following macros are responsible for creating the logo. They load a specific +% page of a PDF file and siplay it. % -% \begin{macro}{\HsHlogoPath} -% This macro contains the path to load the PDF from. It defaults to -% |HSH-Logo.pdf|, which is provieded by this project inside the |scr/| folder. +% \begin{macro}{\HsHlogoPath} +% This macro contains the path to load the PDF from. It defaults to +% |HSH-Logo.pdf|, which is provieded by this project inside the |scr/| folder. % \begin{macrocode} \newcommand{\HsHlogoPath}{HSH-Logo.pdf} % \end{macrocode} -% \end{macro} +% \end{macro} % -% \begin{macro}{\HsHlogoPage} -% This macro stores the page to use from the PDF. It will be set via the -% documentoption \opt{faculty}. +% \begin{macro}{\HsHlogoPage} +% This macro stores the page to use from the PDF. It will be set via the +% documentoption \opt{faculty}. % \begin{macrocode} \newcommand{\HsHlogoPage}{\HsH@opt@faculty} % \end{macrocode} -% \end{macro} +% \end{macro} % -% \begin{macro}{\includeHsHlogohere} -% Calling this macro produces the logo in-place. You can specify the width as an -% optional argument. The default is $5\,\mathrm{cm}$. \par -% If the file provided via \cmd{\HsHlogoPath} doesn't exist, the command will -% produce an error. +% \begin{macro}{\includeHsHlogohere} +% Calling this macro produces the logo in-place. You can specify the width as an +% optional argument. The default is $5\,\mathrm{cm}$. \par +% If the file provided via \cmd{\HsHlogoPath} doesn't exist, the command will +% produce an error. % \begin{macrocode} \newcommand{\includeHsHlogohere}[1][5cm]{ \IfFileExists{\HsHlogoPath}{ @@ -1078,54 +1078,54 @@ http://www.latex-project.org/lppl.txt } } % \end{macrocode} -% \end{macro} +% \end{macro} % -% \subsubsection{Title matters} +% \subsubsection{Title matters} % \begin{macrocode} %<*article|report> % \end{macrocode} % -% The following commands relave to the creation of the titlepage. They Implement -% how the user can define the differnt datafields. -% \smallskip +% The following commands relave to the creation of the titlepage. They Implement +% how the user can define the differnt datafields. +% \smallskip % -% First the |\@author| macro is set to |\@empty|, this makes it easyer to handle it -% later. +% First the |\@author| macro is set to |\@empty|, this makes it easyer to handle it +% later. % \begin{macrocode} \let\@author\@empty % \end{macrocode} % -% \begin{macro}{\title} -% We redefine the |\title| command to take a optional argument. This is stored in -% the additional |\@shorttitle| macro. +% \begin{macro}{\title} +% We redefine the |\title| command to take a optional argument. This is stored in +% the additional |\@shorttitle| macro. % \begin{macrocode} \renewcommand{\title}[2][]{ \gdef\@title{#2} \gdef\@shorttitle{#1} } % \end{macrocode} -% \end{macro} +% \end{macro} % -% \begin{macro}{\@shorttitle} -% This new macro stores a short version of the title. This will be used in places -% where the fill title might overflow the availabel space. +% \begin{macro}{\@shorttitle} +% This new macro stores a short version of the title. This will be used in places +% where the fill title might overflow the availabel space. % \begin{macrocode} \def\@shorttitle{\@empty} % \end{macrocode} -% \end{macro} +% \end{macro} % -% \begin{macro}{\matrikelnr,\@matrikelnr} -% These macros set and store the matrikel-number (or set of numbers), which will -% be printed on the titlepage. +% \begin{macro}{\matrikelnr,\@matrikelnr} +% These macros set and store the matrikel-number (or set of numbers), which will +% be printed on the titlepage. % \begin{macrocode} \newcommand{\matrikelnr}[1]{\gdef\@matrikelnr{#1}} \def\@matrikelnr{\@empty} % \end{macrocode} -% \end{macro} +% \end{macro} % -% \begin{macro}{\professor,\firstexaminer,\secondexaminer,\@professor,\@firstexaminer,\@secondexaminer} -% These three macros-groups give options to the user to print peoples names on -% the titlepage, who are relevant to the document, but not the author. +% \begin{macro}{\professor,\firstexaminer,\secondexaminer,\@professor,\@firstexaminer,\@secondexaminer} +% These three macros-groups give options to the user to print peoples names on +% the titlepage, who are relevant to the document, but not the author. % \begin{macrocode} \newcommand{\professor}[1]{\gdef\@professor{#1}} \def\@professor{\@empty} @@ -1134,39 +1134,39 @@ http://www.latex-project.org/lppl.txt \newcommand{\secondexaminer}[1]{\gdef\@secondexaminer{#1}} \def\@secondexaminer{\@empty} % \end{macrocode} -% \end{macro} +% \end{macro} % -% \begin{macro}{\keywords,\@keywords} -% The macro-group defines and holds keywords which describe the document. They -% are used when printing the abstract as well as in the PDF's meta-data. +% \begin{macro}{\keywords,\@keywords} +% The macro-group defines and holds keywords which describe the document. They +% are used when printing the abstract as well as in the PDF's meta-data. % \begin{macrocode} \newcommand{\keywords}[1]{\gdef\@keywords{#1}} \def\@keywords{\@empty} % \end{macrocode} -% \end{macro} +% \end{macro} % % \begin{macrocode} %</article|report> % \end{macrocode} % -% \subsubsection{Commands for document writing} +% \subsubsection{Commands for document writing} % -% \begin{macro}{\declarationofauthorship} -% The declatation of authorship is not relevant for the \cls{standalone} varaiant. +% \begin{macro}{\declarationofauthorship} +% The declatation of authorship is not relevant for the \cls{standalone} varaiant. % \begin{macrocode} %<*!stadnalone> % \end{macrocode} -% The \pkg{pgffor} package is requried to handle the loope over the list of authors. +% The \pkg{pgffor} package is requried to handle the loope over the list of authors. % \begin{macrocode} \RequirePackage{pgffor} % \end{macrocode} -% Now the command is defined. It takes a optional argument which defaults to \opt{b}. +% Now the command is defined. It takes a optional argument which defaults to \opt{b}. % \begin{macrocode} \newcommand{\declarationofauthorship}[1][b]{ % \end{macrocode} -% First the argument is passed and an error raised for invalid arguments. Passing -% in \opt{b} will push the declatarion to the bottom of the page and add a -% horizontal line. PAssing \opt{t} simply adds some space. +% First the argument is passed and an error raised for invalid arguments. Passing +% in \opt{b} will push the declatarion to the bottom of the page and add a +% horizontal line. PAssing \opt{t} simply adds some space. % \begin{macrocode} \if#1b \vspace*{\fill} @@ -1179,17 +1179,17 @@ http://www.latex-project.org/lppl.txt } \fi\fi % \end{macrocode} -% Now the actuall declatarion can be constructed. It uses the text from |\decofauthname| -% and |\decofauthtext|. +% Now the actuall declatarion can be constructed. It uses the text from |\decofauthname| +% and |\decofauthtext|. % \begin{macrocode} \vskip 3em {\centering\bfseries\usekomafont{section}{\decofauthname}\par} \vskip 3em \decofauthtext\par % \end{macrocode} -% The last step is to loop over all authors by reading |\@author| and creating a -% signature box for each one. |\thanks| also needs to be cleared, as a footnote -% wouldn't make sense here. +% The last step is to loop over all authors by reading |\@author| and creating a +% signature box for each one. |\thanks| also needs to be cleared, as a footnote +% wouldn't make sense here. % \begin{macrocode} \begingroup \renewcommand{\thanks}{\sbox0} @@ -1206,12 +1206,12 @@ http://www.latex-project.org/lppl.txt \endgroup } % \end{macrocode} -% \end{macro} +% \end{macro} % -% \begin{macro}{\ifsingleauthor} -% To ensure |\decofauthtext| is preperly spelled for one or multiple authors, we -% define a conditional that holds this information. Additionally we check the -% number of authors |\AtBeginDocument| and store it. +% \begin{macro}{\ifsingleauthor} +% To ensure |\decofauthtext| is preperly spelled for one or multiple authors, we +% define a conditional that holds this information. Additionally we check the +% number of authors |\AtBeginDocument| and store it. % \begin{macrocode} \newif\ifsingleauthor \AtBeginDocument{ @@ -1223,9 +1223,9 @@ http://www.latex-project.org/lppl.txt \endgroup } % \end{macrocode} -% \end{macro} +% \end{macro} % -% define the localised texts +% define the localised texts % \begin{macrocode} \newcommand{\decofauthname}{Declaration of Authorship} \newcaptionname{english}\decofauthname{Declaration of Authorship} @@ -1250,8 +1250,8 @@ http://www.latex-project.org/lppl.txt } % \end{macrocode} % -% \begin{macro}{\declarationAuthorship} -% \changes{v2.01}{2023-08-11}{Deprecate \cmd{\declarationAuthorship}, as it got replaced by \cmd{\declarationofauthorship}} +% \begin{macro}{\declarationAuthorship} +% \changes{v2.01}{2023-08-11}{Deprecate \cmd{\declarationAuthorship}, as it got replaced by \cmd{\declarationofauthorship}} % \begin{macrocode} \def\declarationAuthorship{% \ClassWarning{\HsHClassName}{% @@ -1262,57 +1262,57 @@ http://www.latex-project.org/lppl.txt } %</!stadnalone> % \end{macrocode} -% \end{macro} +% \end{macro} % -% \subsubsection{Micalanious commands} -% \vspace{-1\baselineskip} -% \paragraph{Utillity commands} -% For writing absolout values, we provide the \cmd{\abs\marg{equ}} command, which -% puts groable, vertical bars on both sides of the equation inside. +% \subsubsection{Micalanious commands} +% \vspace{-1\baselineskip} +% \paragraph{Utillity commands} +% For writing absolout values, we provide the \cmd{\abs\marg{equ}} command, which +% puts groable, vertical bars on both sides of the equation inside. % \begin{macrocode} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} % \end{macrocode} % -% \paragraph{Configuring mathmode-indices} -% The only hard requirements for documents writing on Hochschule Hannover is, that -% the indices in mathematic formulas must be typset in an upright ("steil") font, -% not the default kursive font. We configure this by first defining a macro to -% replace the default \cmd{\sb} macro. We can than assign this to |_|. For that to -% work we need to change its catcode to make it modifyable. -% \begin{note} -% You can allways use \cmd{\sb} to use the original behaviour for special cases. -% \end{note} +% \paragraph{Configuring mathmode-indices} +% The only hard requirements for documents writing on Hochschule Hannover is, that +% the indices in mathematic formulas must be typset in an upright ("steil") font, +% not the default kursive font. We configure this by first defining a macro to +% replace the default \cmd{\sb} macro. We can than assign this to |_|. For that to +% work we need to change its catcode to make it modifyable. +% \begin{note} +% You can allways use \cmd{\sb} to use the original behaviour for special cases. +% \end{note} % \begin{macrocode} \def\@subinrm#1{\sb{\mathrm{#1}}} {\catcode`\_=13 \global\let_=\@subinrm} % \end{macrocode} % -% \begin{macro}{\upsubscripts} -% Now we can define a command to activate this new behavior by changing the catcode -% of |_| to 13, which makes it a normal macro. +% \begin{macro}{\upsubscripts} +% Now we can define a command to activate this new behavior by changing the catcode +% of |_| to 13, which makes it a normal macro. % \begin{macrocode} \newcommand\upsubscripts{\catcode`\_=12} % \end{macrocode} -% \end{macro} +% \end{macro} % -% \begin{macro}{\normalsubscripts} -% To switch back we simply need to reset the catcode of |_| back to the original, -% which makes it a buildin operator with the default behavior. +% \begin{macro}{\normalsubscripts} +% To switch back we simply need to reset the catcode of |_| back to the original, +% which makes it a buildin operator with the default behavior. % \begin{macrocode} \newcommand\normalsubscripts{\catcode`\_=8} % \end{macrocode} -% \end{macro} +% \end{macro} % -% \subsection{Document setup} -% The following sets up the look and feel of the documents using this classe. All -% configuration and stylin is done here. +% \subsection{Document setup} +% The following sets up the look and feel of the documents using this classe. All +% configuration and stylin is done here. % -% \subsubsection{Fonts and text styling} +% \subsubsection{Fonts and text styling} % \begin{macrocode} \RequirePackage{lmodern} % \end{macrocode} % -% \subsubsection{Page layout} +% \subsubsection{Page layout} % % \begin{macrocode} %<*!standalone> @@ -1324,26 +1324,26 @@ http://www.latex-project.org/lppl.txt %</!standalone> % \end{macrocode} % -% \subsubsection{Styling \LaTeX{} default constucts} +% \subsubsection{Styling \LaTeX{} default constucts} % -% \paragraph{Floats}\vspace*{-1\baselineskip} +% \paragraph{Floats}\vspace*{-1\baselineskip} % \begin{macrocode} %<*!standalone> % \end{macrocode} -% Floats should alwasy prefere the \emph{here} placement, than the \emph{top} of -% the following page. +% Floats should alwasy prefere the \emph{here} placement, than the \emph{top} of +% the following page. % \begin{macrocode} \renewcommand{\fps@figure}{h!t} \renewcommand{\fps@table}{h!t} % \end{macrocode} % -% Floats should be centered by default and the width of the caption box is limited. +% Floats should be centered by default and the width of the caption box is limited. % \begin{macrocode} \g@addto@macro\@floatboxreset\centering \setcapwidth{0.8\textwidth} % \end{macrocode} % -% The names of floating enviroments are redefined to show abreviations only. +% The names of floating enviroments are redefined to show abreviations only. % \begin{macrocode} \defcaptionname{english}\figurename{Fig.} \defcaptionname{german,ngerman}\figurename{Abb.} @@ -1351,7 +1351,7 @@ http://www.latex-project.org/lppl.txt \defcaptionname{german,ngerman}\tablename{Tab.} % \end{macrocode} % -% For subfigures we need to define a name used in autoreferences. +% For subfigures we need to define a name used in autoreferences. % \begin{macrocode} \AtBeginDocument{ \makeatletter @@ -1366,8 +1366,8 @@ http://www.latex-project.org/lppl.txt %</!standalone> % \end{macrocode} % -% \paragraph{Lists} -% For unordert liste the markers are redefined to look a littel nicer. +% \paragraph{Lists} +% For unordert liste the markers are redefined to look a littel nicer. % \begin{macrocode} \renewcommand{\labelitemi}{\raisebox{.3ex}{\scalebox{0.7}{$\bullet$}}} \renewcommand{\labelitemii}{\raisebox{.3ex}{\scalebox{0.7}{$\circ$}}} @@ -1375,38 +1375,38 @@ http://www.latex-project.org/lppl.txt \renewcommand{\labelitemiv}{\raisebox{-.1ex}{\scalebox{1.3}{$\cdot$}}} % \end{macrocode} % -% \paragraph{Misc} -% We activae one of the commands defined above to make math-indices upright by -% default. +% \paragraph{Misc} +% We activae one of the commands defined above to make math-indices upright by +% default. % \begin{macrocode} \upsubscripts % \end{macrocode} % -% We want a ragged botton instead of spreading the paragraphs over the page. +% We want a ragged botton instead of spreading the paragraphs over the page. % \begin{macrocode} \raggedbottom % \end{macrocode} % -% The ruler shown in the top and left margin with the \opt{draft} option is -% removed. +% The ruler shown in the top and left margin with the \opt{draft} option is +% removed. % \begin{macrocode} \let\layercontentsmeasure\relax % \end{macrocode} % -% \subsubsection{Header and footer} +% \subsubsection{Header and footer} % % \begin{macrocode} %<*article|report> % \end{macrocode} % -% The header and footer are styled using the low-level commands provided by the -% \KOMAScript{} package \pkg{scrlayer-scrpage}. +% The header and footer are styled using the low-level commands provided by the +% \KOMAScript{} package \pkg{scrlayer-scrpage}. % \begin{macrocode} \RequirePackage{scrlayer-scrpage} \FamilyOptions{KOMA}{headsepline,singlespacing=true} % \end{macrocode} % -% First we define the new pagestyle |HsHheadings|. +% First we define the new pagestyle |HsHheadings|. % \begin{macrocode} \newpagestyle{HsHheadings}{ { @@ -1439,7 +1439,7 @@ http://www.latex-project.org/lppl.txt {\hfill\pagemark} } % \end{macrocode} -% Than all generic settings are applyed: +% Than all generic settings are applyed: % \begin{macrocode} \clearpairofpagestyles \ofoot*{\pagemark} @@ -1453,11 +1453,11 @@ http://www.latex-project.org/lppl.txt %</article|report> % \end{macrocode} % -% \subsubsection{Titlepage} +% \subsubsection{Titlepage} % -% \begin{macro}{\maketitle} -% The definiton of |\maketitle| is mostly taken from the source-code of the -% \KOMAScript{} parrentclass, but was modified to create the desired style. +% \begin{macro}{\maketitle} +% The definiton of |\maketitle| is mostly taken from the source-code of the +% \KOMAScript{} parrentclass, but was modified to create the desired style. % \begin{macrocode} %<*article|report> \newcommand{\professortext}{Professor} @@ -1472,7 +1472,7 @@ http://www.latex-project.org/lppl.txt \newtoks\@tabtoks \newcommand\addtabtoks[1]{\global\@tabtoks\expandafter{\the\@tabtoks#1}} \newcommand\eaddtabtoks[1]{\edef\mytmp{#1}\expandafter\addtabtoks\expandafter{\mytmp}} -% %%\newcommand*\resettabtoks{\global\@tabtoks{}} +%%%\newcommand*\resettabtoks{\global\@tabtoks{}} \newcommand*\printtabtoks{\the\@tabtoks} \addtokomafont{publishers}{\normalsize} \g@addto@macro\titlepage{\singlespacing} @@ -1742,11 +1742,11 @@ http://www.latex-project.org/lppl.txt } %</article|report> % \end{macrocode} -% \end{macro} +% \end{macro} % %\iffalse docstrip-guard %</article|report|standalone> %\fi % -%\Finale +% \Finale \endinput diff --git a/src/HsH-classes.pdf b/src/HsH-classes.pdf index 75ded21..766e891 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:10678dab154a21f3860fa8bd17a665feea659bd433c86b1aac3e19aff2ed34d5 -size 313112 +oid sha256:fe71a12b048b772016e65a50bd8c0fc733747ae5928542a5d8b35c9bd0baebf9 +size 313062 diff --git a/src/HsH-report.cls b/src/HsH-report.cls index d2fbede..eb222b8 100644 --- a/src/HsH-report.cls +++ b/src/HsH-report.cls @@ -17,7 +17,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2022-06-01] \ProvidesClass{HsH-report} - [2024-04-25 3.01 HsH-class based on KOMA] + [2024-04-25 3.01 HsH-class based on KOMA] \let\HsHClassName\@currname \def\HsHClassName@ParrentClass{% scrreprt% @@ -35,56 +35,56 @@ } \DefineFamilyKey{HsH}{fontfamily}{ \begingroup - \FamilySetNumerical{HsH}{parskip}{@tmp}{% - {sans}{0}, {sans-serif}{0},% - {roman}{1}, {serif}{1},% - }{#1} - \ifx\FamilyKeyState\FamilyKeyStateProcessed - \aftergroup\FamilyKeyStateProcessed - \ifcase\@tmp% 0 - \endgroup - \renewcommand{\familydefault}{\sfdefault} - \if@atdocument\AfterKOMAoptions{\selectfont}\fi - \or% 1 - \endgroup - \renewcommand{\familydefault}{\rmdefault} - \if@atdocument\AfterKOMAoptions{\selectfont}\fi - \else% should never be - \endgroup - \fi - \else + \FamilySetNumerical{HsH}{parskip}{@tmp}{% + {sans}{0}, {sans-serif}{0},% + {roman}{1}, {serif}{1},% + }{#1} + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \aftergroup\FamilyKeyStateProcessed + \ifcase\@tmp% 0 + \endgroup + \renewcommand{\familydefault}{\sfdefault} + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \or% 1 + \endgroup + \renewcommand{\familydefault}{\rmdefault} + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \else% should never be \endgroup - \FamilyKeyStateUnknownValue \fi + \else + \endgroup + \FamilyKeyStateUnknownValue + \fi } \HsH@Options@DeclareAlias{sans}{fontfamily=sans} \HsH@Options@DeclareAlias{roman}{fontfamily=roman} \DefineFamilyKey{HsH}{linespacing}{ \begingroup - \FamilySetNumerical{HsH}{linespacing}{@tempa}{% - {single}{0},% - {onehalf}{1},% - {double}{2},% - }{#1} - \ifx\FamilyKeyState\FamilyKeyStateProcessed - \aftergroup\FamilyKeyStateProcessed - \ifcase\@tempa% 0 - \endgroup - \if@atdocument\singlespacing\else\AtEndOfClass{\singlespacing}\fi - \or% 1 - \endgroup - \if@atdocument\onehalfspacing\else\AtEndOfClass{\onehalfspacing\AfterTOCHead{\singlespacing}}\fi - \or% 2 - \endgroup - \if@atdocument\doublespacing\else\AtEndOfClass{\doublespacing\AfterTOCHead{\singlespacing}}\fi + \FamilySetNumerical{HsH}{linespacing}{@tempa}{% + {single}{0},% + {onehalf}{1},% + {double}{2},% + }{#1} + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \aftergroup\FamilyKeyStateProcessed + \ifcase\@tempa% 0 + \endgroup + \if@atdocument\singlespacing\else\AtEndOfClass{\singlespacing}\fi + \or% 1 + \endgroup + \if@atdocument\onehalfspacing\else\AtEndOfClass{\onehalfspacing\AfterTOCHead{\singlespacing}}\fi + \or% 2 + \endgroup + \if@atdocument\doublespacing\else\AtEndOfClass{\doublespacing\AfterTOCHead{\singlespacing}}\fi - \else% should never be - \endgroup - \fi - \else + \else% should never be \endgroup - \FamilyKeyStateUnknownValue \fi + \else + \endgroup + \FamilyKeyStateUnknownValue + \fi } \HsH@Options@DeclareAlias{singlespacing}{linespacing=single} \HsH@Options@DeclareAlias{onehalfspacing}{linespacing=onehalf} @@ -426,6 +426,7 @@ \newtoks\@tabtoks \newcommand\addtabtoks[1]{\global\@tabtoks\expandafter{\the\@tabtoks#1}} \newcommand\eaddtabtoks[1]{\edef\mytmp{#1}\expandafter\addtabtoks\expandafter{\mytmp}} +%%%\newcommand*\resettabtoks{\global\@tabtoks{}} \newcommand*\printtabtoks{\the\@tabtoks} \addtokomafont{publishers}{\normalsize} \g@addto@macro\titlepage{\singlespacing} diff --git a/src/HsH-standalone.cls b/src/HsH-standalone.cls index 010528b..3db593b 100644 --- a/src/HsH-standalone.cls +++ b/src/HsH-standalone.cls @@ -17,7 +17,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2022-06-01] \ProvidesClass{HsH-standalone} - [2024-04-25 3.01 HsH-class based on KOMA] + [2024-04-25 3.01 HsH-class based on KOMA] \let\HsHClassName\@currname \def\HsHClassName@ParrentClass{% standalone% @@ -35,27 +35,27 @@ } \DefineFamilyKey{HsH}{fontfamily}{ \begingroup - \FamilySetNumerical{HsH}{parskip}{@tmp}{% - {sans}{0}, {sans-serif}{0},% - {roman}{1}, {serif}{1},% - }{#1} - \ifx\FamilyKeyState\FamilyKeyStateProcessed - \aftergroup\FamilyKeyStateProcessed - \ifcase\@tmp% 0 - \endgroup - \renewcommand{\familydefault}{\sfdefault} - \if@atdocument\AfterKOMAoptions{\selectfont}\fi - \or% 1 - \endgroup - \renewcommand{\familydefault}{\rmdefault} - \if@atdocument\AfterKOMAoptions{\selectfont}\fi - \else% should never be - \endgroup - \fi - \else + \FamilySetNumerical{HsH}{parskip}{@tmp}{% + {sans}{0}, {sans-serif}{0},% + {roman}{1}, {serif}{1},% + }{#1} + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \aftergroup\FamilyKeyStateProcessed + \ifcase\@tmp% 0 + \endgroup + \renewcommand{\familydefault}{\sfdefault} + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \or% 1 + \endgroup + \renewcommand{\familydefault}{\rmdefault} + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \else% should never be \endgroup - \FamilyKeyStateUnknownValue \fi + \else + \endgroup + \FamilyKeyStateUnknownValue + \fi } \HsH@Options@DeclareAlias{sans}{fontfamily=sans} \HsH@Options@DeclareAlias{roman}{fontfamily=roman} -- GitLab