Files
50ohm-contents-dl/latex/FiftyOhm.cls
T

115 lines
2.7 KiB
OpenEdge ABL

\ProvidesClass{FiftyOhm}
\ExplSyntaxOn
\keys_define:nn {ptxcd/Fragenkatalog} {
tagging .bool_gset:N = \g_ptxcd_tagging_bool,
tagging .initial:n = false,
}
\ExplSyntaxOff
\ProcessKeyOptions[ptxcd/Fragenkatalog]
\disable@package@load{physics}{}
\LoadClass[ngerman, 10pt,twocolumn=true,fontsize=9pt,parskip=half-,listof=leveldown,bibliography=leveldown]{scrreprt}
\deftocheading{toc}{\section*{\contentsname}}
\input{settings-pre.tex}
\RequirePackage{DARC-ausbildungsmaterialien}
\input{settings.tex}
\makeatletter% to ensure right setup -> todo cleanup settings
\usepackage{geometry}
\geometry{
a4paper,
left=25mm,
right=25mm,
top=25mm,
bottom=20mm,
columnsep=1cm,
}
\usepackage{anyfontsize}
\AfterTOCHead[toc]{\sffamily}
\setkomafont{chapter}{\usekomafont{section}}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
\RedeclareSectionCommand[style=chapter,afterindent=false,beforeskip=0pt,afterskip=20pt,tocindent=0pt,tocentryformat=\bfseries\fontsize{11pt}{14pt}\selectfont,
tocpagenumberformat=\sffamily\bfseries,
tocnumwidth=2em,
tocentrybeforeskip=\baselineskip]{section}
\RedeclareSectionCommand[
beforeskip=6pt,runin=false,
afterskip=12pt,
tocentrybeforeskip=1em plus 1pt,
tocentrynumwidth=2.5em,
tocentryentryformat=\bfseries,
tocindent=0pt
]{subsection}
\RedeclareSectionCommand[
beforeskip=\baselineskip,
runin=false,
afterskip=1ex plus .2ex,
tocindent=2.5em]{subsubsection}
\RedeclareSectionCommand[beforeskip=0pt,runin=false,afterskip=15pt]{paragraph}
\RedeclareSectionCommand[beforeskip=\baselineskip,runin=false,afterskip=15pt]{subparagraph}
\renewcommand*{\thesection}{\arabic{section}}
\renewcommand*{\chapterpagestyle}{scrheadings}
\renewcommand\addsectiontocentry[2]{%
\addtocentrydefault{section}{#1}{\TOCUppercase{#2}}%
}
\ExplSyntaxOn
\DeclareRobustCommand{\TOCUppercase}[1]{\texorpdfstring{\text_uppercase:n {#1}}{#1}}
\ExplSyntaxOff
\KOMAoptions{parskip=full-}
\usepackage[footsepline=false] {scrlayer-scrpage}
\setkomafont{pageheadfoot}{\sffamily\footnotesize}
\setkomafont{pagenumber}{\sffamily\bfseries\textcolor{white}}
\DeclareNewLayer[
background,
topmargin,
mode=picture,
oddpage,
outermargin,
addhoffset=-10mm,
width=10mm,
height=15mm,
contents={
\putLL{%
\textcolor{gray}{\rule{10mm}{\layerheight}}%
}
\putC{\makebox(0,0){\pagemark}}
}
]{swatch.odd}
\DeclareNewLayer[
clone=swatch.odd,
evenpage,
addhoffset=38mm
]{swatch.even}
% add the layers to pagestyle scrheadings:
\AddLayersAtBeginOfPageStyle{scrheadings}{swatch.odd,swatch.even}
\raggedbottom
\raggedright% flush left alignment
\ExplSyntaxOn
\bool_if:NT \g_ptxcd_tagging_bool {\file_input:n {tagging-setup}}
\ExplSyntaxOff
\setcounter{page}{5}%Manual page offset, handle with care!
\endinput