--- documentclass: scrreprt linestretch: 1.5 header-includes: - \pagestyle{headings} - \usepackage{scrlayer-scrpage} - \KOMAoptions{headsepline = on} - \KOMAoptions{footsepline = on} - \addtokomafont{pageheadfoot}{\normalfont\small} - \addtokomafont{pagenumber}{\small} - \ModifyLayer[addvoffset = 3pt]{scrheadings.head.below.line} - \ModifyLayer[addvoffset = 3pt]{plain.scrheadings.head.below.line} --- # Test Document _Nothing more here, go to the following pages..._ \newpage This is a page to demonstrate correct header/footer layout. \newpage On this page the header/footer layout is messed up because of the table below. \begingroup \singlespace \renewcommand*{\arraystretch}{1.5} | Right | Left | Default | Center | Multi-line column | |------:|:-----|---------|:------:| ----------------- | | 123 | 123 | 123 | 123 | Some random text that doesn't fit on a single line because it consists of way tooooooooooo many characters | | 123 | 123 | 123 | 123 | Some random text that doesn't fit on a single line because it consists of way tooooooooooo many characters | | 123 | 123 | 123 | 123 | Some random text that doesn't fit on a single line because it consists of way tooooooooooo many characters | | 123 | 123 | 123 | 123 | Some random text that doesn't fit on a single line because it consists of way tooooooooooo many characters | | 123 | 123 | 123 | 123 | Some random text that doesn't fit on a single line because it consists of way tooooooooooo many characters | | 123 | 123 | 123 | 123 | Some random text that doesn't fit on a single line because it consists of way tooooooooooo many characters | | 123 | 123 | 123 | 123 | Some random text that doesn't fit on a single line because it consists of way tooooooooooo many characters | | 123 | 123 | 123 | 123 | Some random text that doesn't fit on a single line because it consists of way tooooooooooo many characters | | 123 | 123 | 123 | 123 | Some random text that doesn't fit on a single line because it consists of way tooooooooooo many characters | | 123 | 123 | 123 | 123 | Some random text that doesn't fit on a single line because it consists of way tooooooooooo many characters | : Test Table \endgroup On this page the header/footer is fine again because the page doesn't end with a table.