Skip to content
Snippets Groups Projects
Commit 930505bb authored by Jan Wille's avatar Jan Wille
Browse files

max width for headerelements and multiline (#7)

parent efa6b2a6
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. ...@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
## [Current] ## [Current]
### Fixed
- `\ihead` and `\ohead` now have a max width and will break into multiple lines (#7)
## [1.4] - 2022-03-28 ## [1.4] - 2022-03-28
......
...@@ -168,15 +168,25 @@ ...@@ -168,15 +168,25 @@
% %
%<*article|report> %<*article|report>
%% header and footer %% header and footer
\pagestyle{scrheadings} \newpagestyle{HsHheadings}{
\clearpairofpagestyles {\parbox{\sls@headwidth}{\LaTeXraggedright\@title}}
{\parbox{\sls@headwidth}{\LaTeXraggedleft\leftmark}}
{
\parbox[b]{.45\sls@headwidth}{\LaTeXraggedright\@title}%
\hfill
\parbox[b]{.45\sls@headwidth}{\LaTeXraggedleft\headmark}%
}
(\textwidth,.1pt)
}{
{\pagemark}
{\hfill\pagemark}
{\hfill\pagemark}
}
\pagestyle{HsHheadings}
%<article>\automark{section} %<article>\automark{section}
%<report>\automark{chapter} %<report>\automark{chapter}
% Chaptertitles get same header/footer as everything: % Chaptertitles get same header/footer as everything:
%<report>\renewcommand*{\chapterpagestyle}{scrheadings} %<report>\renewcommand*{\chapterpagestyle}{HsHheadings}
\ohead{\headmark}
\ihead{\@title}
\ofoot*{\pagemark}
%% floats %% floats
% positioning of floats % positioning of floats
......
...@@ -119,12 +119,22 @@ ...@@ -119,12 +119,22 @@
\upsubscripts \upsubscripts
%% header and footer %% header and footer
\pagestyle{scrheadings} \newpagestyle{HsHheadings}{
\clearpairofpagestyles {\parbox{\sls@headwidth}{\LaTeXraggedright\@title}}
{\parbox{\sls@headwidth}{\LaTeXraggedleft\leftmark}}
{
\parbox[b]{.45\sls@headwidth}{\LaTeXraggedright\@title}%
\hfill
\parbox[b]{.45\sls@headwidth}{\LaTeXraggedleft\headmark}%
}
(\textwidth,.1pt)
}{
{\pagemark}
{\hfill\pagemark}
{\hfill\pagemark}
}
\pagestyle{HsHheadings}
\automark{section} \automark{section}
\ohead{\headmark}
\ihead{\@title}
\ofoot*{\pagemark}
%% floats %% floats
\renewcommand{\fps@figure}{h!t} \renewcommand{\fps@figure}{h!t}
......
...@@ -119,13 +119,23 @@ ...@@ -119,13 +119,23 @@
\upsubscripts \upsubscripts
%% header and footer %% header and footer
\pagestyle{scrheadings} \newpagestyle{HsHheadings}{
\clearpairofpagestyles {\parbox{\sls@headwidth}{\LaTeXraggedright\@title}}
{\parbox{\sls@headwidth}{\LaTeXraggedleft\leftmark}}
{
\parbox[b]{.45\sls@headwidth}{\LaTeXraggedright\@title}%
\hfill
\parbox[b]{.45\sls@headwidth}{\LaTeXraggedleft\headmark}%
}
(\textwidth,.1pt)
}{
{\pagemark}
{\hfill\pagemark}
{\hfill\pagemark}
}
\pagestyle{HsHheadings}
\automark{chapter} \automark{chapter}
\renewcommand*{\chapterpagestyle}{scrheadings} \renewcommand*{\chapterpagestyle}{HsHheadings}
\ohead{\headmark}
\ihead{\@title}
\ofoot*{\pagemark}
%% floats %% floats
\renewcommand{\fps@figure}{h!t} \renewcommand{\fps@figure}{h!t}
......
No preview for this file type
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
} }
\titlehead{titlehead} \titlehead{titlehead}
\subject{Subject} \subject{Subject}
\title{Title} \title{long and elaborate title that just goes on and on witout stopping}
\subtitle{Subtitle} \subtitle{Subtitle}
\date{\today} \date{\today}
\professor{Professor} \professor{Professor}
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
\cleardoublepage % unbedingt erforderlich bei Doppelseitigem layout vor neuer Seitennummerierung! \cleardoublepage % unbedingt erforderlich bei Doppelseitigem layout vor neuer Seitennummerierung!
\pagenumbering{arabic} % Seitennummerierung normale zahlen \pagenumbering{arabic} % Seitennummerierung normale zahlen
\chapter{one} \chapter{very precice chapterheading with a bounch of important information}
\label{chap: one} \label{chap: one}
{\color{red}test} und stuff {\color{red}test} und stuff
\begin{figure} \begin{figure}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment