From 7d5a6388b7cd40a2b1d04edd42821cea20846668 Mon Sep 17 00:00:00 2001 From: Jan Wille <jan.wille@stud.hs-hannover.de> Date: Mon, 4 Nov 2024 20:23:31 +0100 Subject: [PATCH] remove HsH-config and move all configs --- src/HsH-article.cls | 127 +++++++++++++++++++++++++++--------- src/HsH-classes.cfg | 83 ------------------------ src/HsH-classes.dtx | 144 +++++++++++++++++++++++++++++++++-------- src/HsH-classes.pdf | 4 +- src/HsH-report.cls | 127 +++++++++++++++++++++++++++--------- src/HsH-standalone.cls | 113 +++++++++++++++++++++++++------- 6 files changed, 400 insertions(+), 198 deletions(-) delete mode 100644 src/HsH-classes.cfg diff --git a/src/HsH-article.cls b/src/HsH-article.cls index 2c05aba..aae4197 100644 --- a/src/HsH-article.cls +++ b/src/HsH-article.cls @@ -253,51 +253,114 @@ } } } +\RequirePackage[hypcap=true]{caption} +\RequirePackage{graphicx} +\RequirePackage{amsmath,amssymb,amsfonts} +\RequirePackage{enumitem} \if@todos - \PassOptionsToPackage{ + \PassOptionsToPackage{svgnames}{xcolor} + \AtEndOfClass{\RequirePackage{xcolor}} + \RequirePackage[ textsize=small, figwidth=.6\textwidth - }{todonotes} - \RequirePackage{todonotes} + ]{todonotes} + \setuptodonotes{ + backgroundcolor=orange!20!white, + linecolor=orange, + bordercolor=orange!60!white, + } \else \newcommand{\listoftodos}[1]{} \newcommand{\todo}[2][]{} \newcommand{\missingfigure}[2][]{} \fi -\RequirePackage[hypcap=true]{caption} -\RequirePackage{graphicx} -\RequirePackage{amsmath,amssymb,amsfonts} -\RequirePackage[svgnames]{xcolor} -\PassOptionsToPackage{backend=biber}{biblatex} -\AtBeginDocument{ - \makeatletter - \@ifpackageloaded{biblatex}{ - \renewcommand*{\mkbibacro}[1]{\MakeUppercase{#1}} - }{}% - \makeatother +\RequirePackage{xcolor} +\PassOptionsToPackage{ + backend=biber, + bibwarn=true, + url=true, + isbn=false, +}{biblatex} +\AddToHook{package/biblatex/after}{ + \renewcommand*{\mkbibacro}[1]{\MakeUppercase{#1}} } \PassOptionsToPackage{free-standing-units}{siunitx} -\AtBeginDocument{ - \makeatletter - \@ifpackageloaded{siunitx}{ - \iflanguage{ngerman}{ - \sisetup{output-decimal-marker={,}} - }{} +\AddToHook{package/siunitx/after}{ + \sisetup{ + tight-spacing=true, + per-mode=symbol, + exponent-mode=engineering, + round-mode=places, + round-precision=3, + } + \iflanguage{ngerman}{ + \sisetup{output-decimal-marker={,}} }{} - \makeatother } \RequirePackage{scrhack} -\AtBeginDocument{ - \makeatletter - \@ifpackageloaded{listings}{ - \RequirePackage{lstautogobble}\lstset{autogobble=true} - \iflanguage{ngerman}{ - \lstset{literate={Ö}{{\"O}}1{Ä}{{\"A}}1{Ü}{{\"U}}1{ß}{{\ss}}1{ü}{{\"u}}1{ä}{{\"a}}1{ö}{{\"o}}1} - }{} +\AddToHook{package/siunitx/before}{\RequirePackage{xcolor}} +\AddToHook{package/siunitx/after}{ + \lstset{ + commentstyle=\color{gray}, + keywordstyle=\color{FireBrick}\bfseries, + stringstyle=\color{DodgerBlue}, + showstringspaces=false, + basicstyle=\ttfamily, + tabsize=4, + escapeinside={(*@}{@*)}, + } + \RequirePackage{lstautogobble}\lstset{autogobble=true} + \iflanguage{ngerman}{ + \lstset{literate={Ö}{{\"O}}1{Ä}{{\"A}}1{Ü}{{\"U}}1{ß}{{\ss}}1{ü}{{\"u}}1{ä}{{\"a}}1{ö}{{\"o}}1} }{} - \makeatother } -\PassOptionsToPackage{european,EFvoltages,straightvoltages,betterproportions}{circuitikz} +\PassOptionsToPackage{l3}{csvsimple} +\AddToHook{package/csvsimple/after}{ + \csvstyle{every csv}{separator=semicolon} +} +\AddToHook{package/pgfplots/after}{ + \usepgfplotslibrary{fillbetween} + \usetikzlibrary{patterns} + \pgfplotsset{ + compat=1.16, + /pgf/number format/read comma as period, + tick label style={font=\tiny}, + legend style={font=\footnotesize}, + MyPlots/.style = { % Style for all plots + width=.6\textwidth, + grid=major, + grid style={loosely dotted,gray!50}, + legend pos=outer north east, + FM1/.style = {blue, thick, mark=x, mark size=1.5,samples=100}, % Format 1 + FM2/.style = {orange, thick, mark=*, mark size=1,samples=100}, % Format 2 + FM3/.style = {green, thick, mark=square*, mark size=1,samples=100}, % Format 3 + FM4/.style = {red, thick, mark=diamond*, mark size=1,samples=100}, % Format 4 + FM5/.style = {pink, thick, mark=triangel*, mark size=1,samples=100},% Format 5 + errBars/.style = {error bars/.cd, y dir=both, y explicit, % ermöglicht Fehlerbalken + error mark options={mark size=1pt,rotate=90}}, + } + } + \iflanguage{ngerman}{ + \pgfplotsset{/pgf/number format/use comma} + }{} +} +\AddToHook{package/pgfplotstable/after}{ + \pgfplotstableset{ + col sep=semicolon, % global seperator for csv files + } +} +\PassOptionsToPackage{ + european, + EFvoltages, + straightvoltages, + betterproportions +}{circuitikz} +\AddToHook{package/circuitikz/after}{ + \ctikzset{ + font=\footnotesize, + bipole annotation style/.style={font=\tiny ,inner sep=1pt}, + } +} \AtBeginDocument{ \makeatletter \InputIfFileExists{HsH-classes.cfg}{ @@ -383,6 +446,8 @@ }% \declarationofauthorship% } +\newlist{checklist}{itemize}{2} +\setlist[checklist]{label=$\square$} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \def\@subinrm#1{\sb{\mathrm{#1}}} {\catcode`\_=13 \global\let_=\@subinrm} @@ -474,7 +539,6 @@ \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} @@ -624,6 +688,7 @@ \fi \global\let\and\relax } +\defcaptionname{german,ngerman}\abstractname{Abstract} \newcaptionname{english}\professorname{Professor} \newcaptionname{german,ngerman}\professorname{Professor(in)/Lehrbeauftragte(r)} \newcaptionname{english}\firstexaminername{First examiner} diff --git a/src/HsH-classes.cfg b/src/HsH-classes.cfg deleted file mode 100644 index a8c77fa..0000000 --- a/src/HsH-classes.cfg +++ /dev/null @@ -1,83 +0,0 @@ -%% opinionated settings: -\defcaptionname{german,ngerman}\abstractname{Abstract} -%% configs for optional packages: -\@ifpackageloaded{biblatex}{ - \ExecuteBibliographyOptions{ - bibwarn=true, - url=true, - isbn=false, - } -}{} -\@ifpackageloaded{todonotes}{ - \setuptodonotes{ - backgroundcolor=orange!60!white, - linecolor=orange, - bordercolor=white - } -}{} -\@ifpackageloaded{siunitx}{ - \sisetup{ - tight-spacing=true, - per-mode=symbol, - exponent-mode=engineering, - %exponent-to-prefix, % use this instead of sci-notatio - round-mode = places, % round numbers - round-precision = 3, % to 3 places - } -}{} -\@ifpackageloaded{listings}{ - \lstset{ - commentstyle=\color{gray}, - keywordstyle=\color{FireBrick}\bfseries, - stringstyle=\color{DodgerBlue}, - showstringspaces=false, - basicstyle=\ttfamily, - tabsize=4, - escapeinside={(*@}{@*)}, - } -}{} -\@ifpackageloaded{enumitem}{ - \RequirePackage{amssymb} - \newlist{checklist}{itemize}{2} - \setlist[checklist]{label=$\square$} -}{} -\@ifpackageloaded{csvsimple}{ - \csvstyle{every csv}{separator=semicolon} % global seperator for csv files -}{} -\@ifpackageloaded{circuitikz}{ - \ctikzset{ - font=\footnotesize, - bipole annotation style/.style={font=\tiny ,inner sep=1pt}, - } -}{} -\@ifpackageloaded{pgfplots}{ - \usepgfplotslibrary{fillbetween} % mark areas under or between graphs - \usetikzlibrary{patterns} % for using pattern in plots - \iflanguage{ngerman}{ - \pgfplotsset{/pgf/number format/use comma} - }{}% - \pgfplotsset{ - compat=1.16, - /pgf/number format/read comma as period, - tick label style={font=\tiny}, - legend style={font=\footnotesize}, - MyPlots/.style = { % Style for all plots - width=.6\textwidth, - grid=major, - grid style={loosely dotted,gray!50}, - legend pos=outer north east, - FM1/.style = {blue, thick, mark=x, mark size=1.5,samples=100}, % Format 1 - FM2/.style = {orange, thick, mark=*, mark size=1,samples=100}, % Format 2 - FM3/.style = {green, thick, mark=square*, mark size=1,samples=100}, % Format 3 - FM4/.style = {red, thick, mark=diamond*, mark size=1,samples=100}, % Format 4 - FM5/.style = {pink, thick, mark=triangel*, mark size=1,samples=100},% Format 5 - errBars/.style = {error bars/.cd, y dir=both, y explicit, % ermöglicht Fehlerbalken - error mark options={mark size=1pt,rotate=90}}, - } - } -}{} -\@ifpackageloaded{pgfplotstable}{ - \pgfplotstableset{ - col sep=semicolon, % global seperator for csv files - } -}{} diff --git a/src/HsH-classes.dtx b/src/HsH-classes.dtx index 282db27..4669328 100644 --- a/src/HsH-classes.dtx +++ b/src/HsH-classes.dtx @@ -985,7 +985,6 @@ http://www.latex-project.org/lppl.txt } } } -\PassOptionsToPackage{hyperref}{xcolor} %</!standalone> % \end{macrocode} % @@ -1010,17 +1009,28 @@ http://www.latex-project.org/lppl.txt \RequirePackage{amsmath,amssymb,amsfonts} % \end{macrocode} % +% The \pkg{enumitem} package is very helpful for defining lists of any kind. +% We use it to provide a checklist implementation. +% \begin{macrocode} +\RequirePackage{enumitem} +% \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. % \begin{macrocode} \if@todos \PassOptionsToPackage{svgnames}{xcolor} - \AtBeginOfDocument{\RequirePackage{xcolor}} + \AtEndOfClass{\RequirePackage{xcolor}} \RequirePackage[ textsize=small, figwidth=.6\textwidth ]{todonotes} + \setuptodonotes{ + backgroundcolor=orange!20!white, + linecolor=orange, + bordercolor=orange!60!white, + } \else \newcommand{\listoftodos}[1]{} \newcommand{\todo}[2][]{} @@ -1045,13 +1055,14 @@ http://www.latex-project.org/lppl.txt % the settings in |.latexmkrc|. % \begin{macrocode} %<*article|report> -\PassOptionsToPackage{backend=biber}{biblatex} -\AtBeginDocument{ - \makeatletter - \@ifpackageloaded{biblatex}{ - \renewcommand*{\mkbibacro}[1]{\MakeUppercase{#1}} - }{}% - \makeatother +\PassOptionsToPackage{ + backend=biber, + bibwarn=true, + url=true, + isbn=false, +}{biblatex} +\AddToHook{package/biblatex/after}{ + \renewcommand*{\mkbibacro}[1]{\MakeUppercase{#1}} } %</article|report> % \end{macrocode} @@ -1060,14 +1071,17 @@ http://www.latex-project.org/lppl.txt % We also ensure german language specific settings are applyed. % \begin{macrocode} \PassOptionsToPackage{free-standing-units}{siunitx} -\AtBeginDocument{ - \makeatletter - \@ifpackageloaded{siunitx}{ - \iflanguage{ngerman}{ - \sisetup{output-decimal-marker={,}} - }{} +\AddToHook{package/siunitx/after}{ + \sisetup{ + tight-spacing=true, + per-mode=symbol, + exponent-mode=engineering, + round-mode=places, + round-precision=3, + } + \iflanguage{ngerman}{ + \sisetup{output-decimal-marker={,}} }{} - \makeatother } % \end{macrocode} % @@ -1075,21 +1089,83 @@ http://www.latex-project.org/lppl.txt % \pkg{scrhack} package. We also pass some configurations to if if it gets loaded. % \begin{macrocode} \RequirePackage{scrhack} -\AtBeginDocument{ - \makeatletter - \@ifpackageloaded{listings}{ - \RequirePackage{lstautogobble}\lstset{autogobble=true} - \iflanguage{ngerman}{ - \lstset{literate={Ö}{{\"O}}1{Ä}{{\"A}}1{Ü}{{\"U}}1{ß}{{\ss}}1{ü}{{\"u}}1{ä}{{\"a}}1{ö}{{\"o}}1} - }{} +\AddToHook{package/siunitx/before}{\RequirePackage{xcolor}} +\AddToHook{package/siunitx/after}{ + \lstset{ + commentstyle=\color{gray}, + keywordstyle=\color{FireBrick}\bfseries, + stringstyle=\color{DodgerBlue}, + showstringspaces=false, + basicstyle=\ttfamily, + tabsize=4, + escapeinside={(*@}{@*)}, + } + \RequirePackage{lstautogobble}\lstset{autogobble=true} + \iflanguage{ngerman}{ + \lstset{literate={Ö}{{\"O}}1{Ä}{{\"A}}1{Ü}{{\"U}}1{ß}{{\ss}}1{ü}{{\"u}}1{ä}{{\"a}}1{ö}{{\"o}}1} }{} - \makeatother } % \end{macrocode} % +% The \pkg{csvsimple} is helpfull wehn wanting to import CSV-files and display them as tables. +% \begin{macrocode} +\PassOptionsToPackage{l3}{csvsimple} +\AddToHook{package/csvsimple/after}{ + \csvstyle{every csv}{separator=semicolon} +} +% \end{macrocode} +% +% \pkg{pgfplots} is a powerfull package for ploting data. +% \begin{macrocode} +\AddToHook{package/pgfplots/after}{ + \usepgfplotslibrary{fillbetween} + \usetikzlibrary{patterns} + \pgfplotsset{ + compat=1.16, + /pgf/number format/read comma as period, + tick label style={font=\tiny}, + legend style={font=\footnotesize}, + MyPlots/.style = { % Style for all plots + width=.6\textwidth, + grid=major, + grid style={loosely dotted,gray!50}, + legend pos=outer north east, + FM1/.style = {blue, thick, mark=x, mark size=1.5,samples=100}, % Format 1 + FM2/.style = {orange, thick, mark=*, mark size=1,samples=100}, % Format 2 + FM3/.style = {green, thick, mark=square*, mark size=1,samples=100}, % Format 3 + FM4/.style = {red, thick, mark=diamond*, mark size=1,samples=100}, % Format 4 + FM5/.style = {pink, thick, mark=triangel*, mark size=1,samples=100},% Format 5 + errBars/.style = {error bars/.cd, y dir=both, y explicit, % ermöglicht Fehlerbalken + error mark options={mark size=1pt,rotate=90}}, + } + } + \iflanguage{ngerman}{ + \pgfplotsset{/pgf/number format/use comma} + }{} +} +\AddToHook{package/pgfplotstable/after}{ + \pgfplotstableset{ + col sep=semicolon, % global seperator for csv files + } +} +% \end{macrocode} +% +% +% % The \pkg{circuitikz} needs bo be configure so it matches typical european styles. % \begin{macrocode} -\PassOptionsToPackage{european,EFvoltages,straightvoltages,betterproportions}{circuitikz} +\PassOptionsToPackage{ + european, + EFvoltages, + straightvoltages, + betterproportions +}{circuitikz} +\AddToHook{package/circuitikz/after}{ + \ctikzset{ + font=\footnotesize, + bipole annotation style/.style={font=\tiny ,inner sep=1pt}, + } +} % \end{macrocode} % % For other packages we provide the settings more as a recomendation of what is @@ -1385,6 +1461,15 @@ http://www.latex-project.org/lppl.txt % \end{macrocode} % \end{macro} % +% \begin{environment}{checklist} +% Using the \pkg{enumitem} package, we define a hepful enviroment for creation +% checklist. +% \begin{macrocode} +\newlist{checklist}{itemize}{2} +\setlist[checklist]{label=$\square$} +% \end{macrocode} +% \end{environment} +% % \subsubsection{Micalanious commands} % \vspace{-1\baselineskip} % \paragraph{Utillity commands} @@ -1615,7 +1700,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} @@ -1891,6 +1976,13 @@ http://www.latex-project.org/lppl.txt %<*localisation> %\fi % +% \begin{macro}{\abstractname} +% The Englsich word "Abstract" is preffered over the German translation. +% \begin{macrocode} +\defcaptionname{german,ngerman}\abstractname{Abstract} +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\professorname,\firstexaminername,\secondexaminername} % Define the commands content for the different supported languages. % \begin{macrocode} diff --git a/src/HsH-classes.pdf b/src/HsH-classes.pdf index 882e212..1ae5111 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:4e2f1639bbcb527e597d6984a97191816120bcf2af9f75c9ec3bfffa59af0db4 -size 317747 +oid sha256:9746ef508fe58b38202f93377c68067052070d091ec31aa08389926a8f259d2f +size 329849 diff --git a/src/HsH-report.cls b/src/HsH-report.cls index 1965390..00fe5b3 100644 --- a/src/HsH-report.cls +++ b/src/HsH-report.cls @@ -253,51 +253,114 @@ } } } +\RequirePackage[hypcap=true]{caption} +\RequirePackage{graphicx} +\RequirePackage{amsmath,amssymb,amsfonts} +\RequirePackage{enumitem} \if@todos - \PassOptionsToPackage{ + \PassOptionsToPackage{svgnames}{xcolor} + \AtEndOfClass{\RequirePackage{xcolor}} + \RequirePackage[ textsize=small, figwidth=.6\textwidth - }{todonotes} - \RequirePackage{todonotes} + ]{todonotes} + \setuptodonotes{ + backgroundcolor=orange!20!white, + linecolor=orange, + bordercolor=orange!60!white, + } \else \newcommand{\listoftodos}[1]{} \newcommand{\todo}[2][]{} \newcommand{\missingfigure}[2][]{} \fi -\RequirePackage[hypcap=true]{caption} -\RequirePackage{graphicx} -\RequirePackage{amsmath,amssymb,amsfonts} -\RequirePackage[svgnames]{xcolor} -\PassOptionsToPackage{backend=biber}{biblatex} -\AtBeginDocument{ - \makeatletter - \@ifpackageloaded{biblatex}{ - \renewcommand*{\mkbibacro}[1]{\MakeUppercase{#1}} - }{}% - \makeatother +\RequirePackage{xcolor} +\PassOptionsToPackage{ + backend=biber, + bibwarn=true, + url=true, + isbn=false, +}{biblatex} +\AddToHook{package/biblatex/after}{ + \renewcommand*{\mkbibacro}[1]{\MakeUppercase{#1}} } \PassOptionsToPackage{free-standing-units}{siunitx} -\AtBeginDocument{ - \makeatletter - \@ifpackageloaded{siunitx}{ - \iflanguage{ngerman}{ - \sisetup{output-decimal-marker={,}} - }{} +\AddToHook{package/siunitx/after}{ + \sisetup{ + tight-spacing=true, + per-mode=symbol, + exponent-mode=engineering, + round-mode=places, + round-precision=3, + } + \iflanguage{ngerman}{ + \sisetup{output-decimal-marker={,}} }{} - \makeatother } \RequirePackage{scrhack} -\AtBeginDocument{ - \makeatletter - \@ifpackageloaded{listings}{ - \RequirePackage{lstautogobble}\lstset{autogobble=true} - \iflanguage{ngerman}{ - \lstset{literate={Ö}{{\"O}}1{Ä}{{\"A}}1{Ü}{{\"U}}1{ß}{{\ss}}1{ü}{{\"u}}1{ä}{{\"a}}1{ö}{{\"o}}1} - }{} +\AddToHook{package/siunitx/before}{\RequirePackage{xcolor}} +\AddToHook{package/siunitx/after}{ + \lstset{ + commentstyle=\color{gray}, + keywordstyle=\color{FireBrick}\bfseries, + stringstyle=\color{DodgerBlue}, + showstringspaces=false, + basicstyle=\ttfamily, + tabsize=4, + escapeinside={(*@}{@*)}, + } + \RequirePackage{lstautogobble}\lstset{autogobble=true} + \iflanguage{ngerman}{ + \lstset{literate={Ö}{{\"O}}1{Ä}{{\"A}}1{Ü}{{\"U}}1{ß}{{\ss}}1{ü}{{\"u}}1{ä}{{\"a}}1{ö}{{\"o}}1} }{} - \makeatother } -\PassOptionsToPackage{european,EFvoltages,straightvoltages,betterproportions}{circuitikz} +\PassOptionsToPackage{l3}{csvsimple} +\AddToHook{package/csvsimple/after}{ + \csvstyle{every csv}{separator=semicolon} +} +\AddToHook{package/pgfplots/after}{ + \usepgfplotslibrary{fillbetween} + \usetikzlibrary{patterns} + \pgfplotsset{ + compat=1.16, + /pgf/number format/read comma as period, + tick label style={font=\tiny}, + legend style={font=\footnotesize}, + MyPlots/.style = { % Style for all plots + width=.6\textwidth, + grid=major, + grid style={loosely dotted,gray!50}, + legend pos=outer north east, + FM1/.style = {blue, thick, mark=x, mark size=1.5,samples=100}, % Format 1 + FM2/.style = {orange, thick, mark=*, mark size=1,samples=100}, % Format 2 + FM3/.style = {green, thick, mark=square*, mark size=1,samples=100}, % Format 3 + FM4/.style = {red, thick, mark=diamond*, mark size=1,samples=100}, % Format 4 + FM5/.style = {pink, thick, mark=triangel*, mark size=1,samples=100},% Format 5 + errBars/.style = {error bars/.cd, y dir=both, y explicit, % ermöglicht Fehlerbalken + error mark options={mark size=1pt,rotate=90}}, + } + } + \iflanguage{ngerman}{ + \pgfplotsset{/pgf/number format/use comma} + }{} +} +\AddToHook{package/pgfplotstable/after}{ + \pgfplotstableset{ + col sep=semicolon, % global seperator for csv files + } +} +\PassOptionsToPackage{ + european, + EFvoltages, + straightvoltages, + betterproportions +}{circuitikz} +\AddToHook{package/circuitikz/after}{ + \ctikzset{ + font=\footnotesize, + bipole annotation style/.style={font=\tiny ,inner sep=1pt}, + } +} \AtBeginDocument{ \makeatletter \InputIfFileExists{HsH-classes.cfg}{ @@ -396,6 +459,8 @@ }% \declarationofauthorship% } +\newlist{checklist}{itemize}{2} +\setlist[checklist]{label=$\square$} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \def\@subinrm#1{\sb{\mathrm{#1}}} {\catcode`\_=13 \global\let_=\@subinrm} @@ -488,7 +553,6 @@ \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} @@ -694,6 +758,7 @@ \fi \global\let\and\relax } +\defcaptionname{german,ngerman}\abstractname{Abstract} \newcaptionname{english}\professorname{Professor} \newcaptionname{german,ngerman}\professorname{Professor(in)/Lehrbeauftragte(r)} \newcaptionname{english}\firstexaminername{First examiner} diff --git a/src/HsH-standalone.cls b/src/HsH-standalone.cls index 61a94ce..438700a 100644 --- a/src/HsH-standalone.cls +++ b/src/HsH-standalone.cls @@ -105,45 +105,105 @@ \RequirePackage[autostyle=true]{csquotes} \MakeOuterQuote{"} \iflanguage{ngerman}{\RequirePackage{ziffer}}{} -\RequirePackage[hidelinks]{hyperref} % must load before `bookmarks' -\RequirePackage{bookmark} +\RequirePackage[hypcap=true]{caption} +\RequirePackage{graphicx} +\RequirePackage{amsmath,amssymb,amsfonts} +\RequirePackage{enumitem} \if@todos - \PassOptionsToPackage{ + \PassOptionsToPackage{svgnames}{xcolor} + \AtEndOfClass{\RequirePackage{xcolor}} + \RequirePackage[ textsize=small, figwidth=.6\textwidth - }{todonotes} - \RequirePackage{todonotes} + ]{todonotes} + \setuptodonotes{ + backgroundcolor=orange!20!white, + linecolor=orange, + bordercolor=orange!60!white, + } \else \newcommand{\listoftodos}[1]{} \newcommand{\todo}[2][]{} \newcommand{\missingfigure}[2][]{} \fi -\RequirePackage[hypcap=true]{caption} -\RequirePackage{graphicx} -\RequirePackage{amsmath,amssymb,amsfonts} -\RequirePackage[svgnames]{xcolor} +\RequirePackage{xcolor} \PassOptionsToPackage{free-standing-units}{siunitx} -\AtBeginDocument{ - \makeatletter - \@ifpackageloaded{siunitx}{ - \iflanguage{ngerman}{ - \sisetup{output-decimal-marker={,}} - }{} +\AddToHook{package/siunitx/after}{ + \sisetup{ + tight-spacing=true, + per-mode=symbol, + exponent-mode=engineering, + round-mode=places, + round-precision=3, + } + \iflanguage{ngerman}{ + \sisetup{output-decimal-marker={,}} }{} - \makeatother } \RequirePackage{scrhack} -\AtBeginDocument{ - \makeatletter - \@ifpackageloaded{listings}{ - \RequirePackage{lstautogobble}\lstset{autogobble=true} - \iflanguage{ngerman}{ - \lstset{literate={Ö}{{\"O}}1{Ä}{{\"A}}1{Ü}{{\"U}}1{ß}{{\ss}}1{ü}{{\"u}}1{ä}{{\"a}}1{ö}{{\"o}}1} - }{} +\AddToHook{package/siunitx/before}{\RequirePackage{xcolor}} +\AddToHook{package/siunitx/after}{ + \lstset{ + commentstyle=\color{gray}, + keywordstyle=\color{FireBrick}\bfseries, + stringstyle=\color{DodgerBlue}, + showstringspaces=false, + basicstyle=\ttfamily, + tabsize=4, + escapeinside={(*@}{@*)}, + } + \RequirePackage{lstautogobble}\lstset{autogobble=true} + \iflanguage{ngerman}{ + \lstset{literate={Ö}{{\"O}}1{Ä}{{\"A}}1{Ü}{{\"U}}1{ß}{{\ss}}1{ü}{{\"u}}1{ä}{{\"a}}1{ö}{{\"o}}1} }{} - \makeatother } -\PassOptionsToPackage{european,EFvoltages,straightvoltages,betterproportions}{circuitikz} +\PassOptionsToPackage{l3}{csvsimple} +\AddToHook{package/csvsimple/after}{ + \csvstyle{every csv}{separator=semicolon} +} +\AddToHook{package/pgfplots/after}{ + \usepgfplotslibrary{fillbetween} + \usetikzlibrary{patterns} + \pgfplotsset{ + compat=1.16, + /pgf/number format/read comma as period, + tick label style={font=\tiny}, + legend style={font=\footnotesize}, + MyPlots/.style = { % Style for all plots + width=.6\textwidth, + grid=major, + grid style={loosely dotted,gray!50}, + legend pos=outer north east, + FM1/.style = {blue, thick, mark=x, mark size=1.5,samples=100}, % Format 1 + FM2/.style = {orange, thick, mark=*, mark size=1,samples=100}, % Format 2 + FM3/.style = {green, thick, mark=square*, mark size=1,samples=100}, % Format 3 + FM4/.style = {red, thick, mark=diamond*, mark size=1,samples=100}, % Format 4 + FM5/.style = {pink, thick, mark=triangel*, mark size=1,samples=100},% Format 5 + errBars/.style = {error bars/.cd, y dir=both, y explicit, % ermöglicht Fehlerbalken + error mark options={mark size=1pt,rotate=90}}, + } + } + \iflanguage{ngerman}{ + \pgfplotsset{/pgf/number format/use comma} + }{} +} +\AddToHook{package/pgfplotstable/after}{ + \pgfplotstableset{ + col sep=semicolon, % global seperator for csv files + } +} +\PassOptionsToPackage{ + european, + EFvoltages, + straightvoltages, + betterproportions +}{circuitikz} +\AddToHook{package/circuitikz/after}{ + \ctikzset{ + font=\footnotesize, + bipole annotation style/.style={font=\tiny ,inner sep=1pt}, + } +} \AtBeginDocument{ \makeatletter \InputIfFileExists{HsH-classes.cfg}{ @@ -211,6 +271,8 @@ }% \declarationofauthorship% } +\newlist{checklist}{itemize}{2} +\setlist[checklist]{label=$\square$} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \def\@subinrm#1{\sb{\mathrm{#1}}} {\catcode`\_=13 \global\let_=\@subinrm} @@ -223,6 +285,7 @@ \renewcommand{\labelitemiv}{\raisebox{-.1ex}{\scalebox{1.3}{$\cdot$}}} \upsubscripts \raggedbottom +\defcaptionname{german,ngerman}\abstractname{Abstract} \newcaptionname{english}\professorname{Professor} \newcaptionname{german,ngerman}\professorname{Professor(in)/Lehrbeauftragte(r)} \newcaptionname{english}\firstexaminername{First examiner} -- GitLab