TransWikia.com

How to make sure the header is not "floating"?

TeX - LaTeX Asked by Soleil on April 9, 2021

In a classicthesis document with twopages, I have chapters, and they appear in the header.
However for one of them, the header over few pages is vertically shifted. All the other pages have the chapter correctly aligned.

  1. why ?
  2. how to prevent this floating from happening ?

I’m using this setup:

usepackage[beramono, pdfspacing, dottedtoc]{classicthesis}

renewcommand{sectionmark}[1]{markright{spacedlowsmallcaps{#1}}} % Header for even pages (twoside)
renewcommand{subsectionmark}[1]{markright{thesection~#1}} % Header on odd pages
lehead
{
    mbox{llap{smallthepagekern 1emcolor{black} vline}
    color{black}hspace{0.5em}rightmarkhfil}
} % The header style
pagestyle{scrheadings}

Using:

chapter{D'un style d'enseignement `a Vincennes... Ch^atelet, Deleuze, Lyotard}

I get:

enter image description here

For repro:

documentclass[11pt, a4paper, twoside, headinclude, footinclude]{book}

usepackage[beramono, pdfspacing, dottedtoc ]{classicthesis}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{enumitem, varioref, bm, url, epigraph, libertine, float, afterpage}
usepackage[autostyle]{csquotes}
usepackage{lipsum}
renewcommand{sectionmark}[1]{markright{spacedlowsmallcaps{#1}}} % The header for all pages (oneside) or for even pages (twoside)
renewcommand{subsectionmark}[1]{markright{thesubsection~#1}} % Uncomment when using the twoside option - this modifies the header on odd pages
lehead
{
    mbox{llap{smallthepagekern 1emcolor{black} vline} color{black}hspace{0.5em}rightmarkhfil}
} % The header style
pagestyle{scrheadings}
title{Book title}
date{}
author{}
begin{document}
pagenumbering{gobble}
newpagephantom{.}
{centering maketitle}
pagestyle{plain}
tableofcontents{}
cleardoublepage
pagenumbering{arabic}
pagestyle{scrheadings}
chapter{D'un style d'enseignement `a Vincennesldots Ch^atelet, Deleuze, Lyotard}
lipsum[2-10]
lipsum[2-10]
end{document}

In the repro code, we can see the problem in the last two pages.

The log is telling what happened, but I don’t see how to correct the source:

Chapter 1. [1] Underfull vbox (badness 1152) has occurred while output is active Overfull hbox (25.01971pt too wide) has occurred while output is active [][] 

Package scrlayer-scrpage Warning: headheight to low.
(scrlayer-scrpage)                At least 37.8001pt needed,
(scrlayer-scrpage)                but only 15.95pt found.
(scrlayer-scrpage)                I'll enlarge headheight, for further
(scrlayer-scrpage)                processing, but you should do this yourself,
(scrlayer-scrpage)                e.g., setting typearea's option
(scrlayer-scrpage)                `headheight=37.8001pt'.
(scrlayer-scrpage)                I'll also decrease topmargin on input line 31.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP