diff --git a/src/HsH-article.cls b/src/HsH-article.cls index 1d43d8d1c7570331a7f53b5b47fa6f90c70f899f..af8be928a1b28040574da73f9e4f06cdca215eb7 100644 --- a/src/HsH-article.cls +++ b/src/HsH-article.cls @@ -101,6 +101,11 @@ \PassOptionsToPackage{european,EFvoltages,straightvoltages,betterproportions}{circuitikz} %% title matters ---------------------------------------------------------------------------------- +\newcommand*{\@shorttitle}{\@empty} +\renewcommand{\title}[2][]{ + \gdef\@title{#2} + \gdef\@shorttitle{#1} +} \newcommand*{\@matrikelnr}{} \newcommand{\matrikelnr}[1]{\gdef\@matrikelnr{#1}} \newcommand*{\@professor}{} @@ -119,12 +124,30 @@ \upsubscripts %% header and footer -\pagestyle{scrheadings} -\clearpairofpagestyles +\newpagestyle{HsHheadings}{ + { + \parbox[b]{\sls@headwidth}{ + \LaTeXraggedright + \ifx\@shorttitle\@empty\@title\else\@shorttitle\fi + }% + } + {\parbox[b]{\sls@headwidth}{\LaTeXraggedleft\leftmark}} + { + \parbox[b]{.45\sls@headwidth}{ + \LaTeXraggedright + \ifx\@shorttitle\@empty\@title\else\@shorttitle\fi + }% + \hfill + \parbox[b]{.45\sls@headwidth}{\LaTeXraggedleft\headmark}% + } + (\textwidth,.1pt) +}{ + {\pagemark} + {\hfill\pagemark} + {\hfill\pagemark} +} +\pagestyle{HsHheadings} \automark{section} -\ohead{\headmark} -\ihead{\@title} -\ofoot*{\pagemark} %% floats \renewcommand{\fps@figure}{h!t} diff --git a/src/HsH-report.cls b/src/HsH-report.cls index 24d670ceb6f08633243e80e5c75f91d592a369d8..ac8a96207059ad94f12c68ef0f531e5871d107d8 100644 --- a/src/HsH-report.cls +++ b/src/HsH-report.cls @@ -101,6 +101,11 @@ \PassOptionsToPackage{european,EFvoltages,straightvoltages,betterproportions}{circuitikz} %% title matters ---------------------------------------------------------------------------------- +\newcommand*{\@shorttitle}{\@empty} +\renewcommand{\title}[2][]{ + \gdef\@title{#2} + \gdef\@shorttitle{#1} +} \newcommand*{\@matrikelnr}{} \newcommand{\matrikelnr}[1]{\gdef\@matrikelnr{#1}} \newcommand*{\@professor}{} @@ -119,13 +124,31 @@ \upsubscripts %% header and footer -\pagestyle{scrheadings} -\clearpairofpagestyles +\newpagestyle{HsHheadings}{ + { + \parbox[b]{\sls@headwidth}{ + \LaTeXraggedright + \ifx\@shorttitle\@empty\@title\else\@shorttitle\fi + }% + } + {\parbox[b]{\sls@headwidth}{\LaTeXraggedleft\leftmark}} + { + \parbox[b]{.45\sls@headwidth}{ + \LaTeXraggedright + \ifx\@shorttitle\@empty\@title\else\@shorttitle\fi + }% + \hfill + \parbox[b]{.45\sls@headwidth}{\LaTeXraggedleft\headmark}% + } + (\textwidth,.1pt) +}{ + {\pagemark} + {\hfill\pagemark} + {\hfill\pagemark} +} +\pagestyle{HsHheadings} \automark{chapter} -\renewcommand*{\chapterpagestyle}{scrheadings} -\ohead{\headmark} -\ihead{\@title} -\ofoot*{\pagemark} +\renewcommand*{\chapterpagestyle}{HsHheadings} %% floats \renewcommand{\fps@figure}{h!t}