you want the same page style for the whole document so put \setlength\headheight{26pt} in the document preamble, presumably where you have other fancyhdr settings.
– David CarlisleMay 29 '20 at 13:11
1
My crystal ball tells me you have a very long chapter title that is getting wrapped into two lines. You can use \chapter[short title]{long title} to use a shorter title for the header and TOC.
– John KormyloMay 29 '20 at 13:20
@DavidCarlisle Thanks. Would it be a problem if I just left it as warming? I just worry, I change the preamble, the whole document went wrong
– aanMay 29 '20 at 13:38
7
It is warning you that your layout is being forcibly changed mid document and will be inconsistent. It only gives that warning when it is true. You can ignore it but don't use the document for publication in that case. As John says the alternative is to use a smaller heading that does fit in the space.
– David CarlisleMay 29 '20 at 13:42
@aan You can find the solution in the answer to this question https://tex.stackexchange.com/questions/198692/headheight-problem
– AradnixFeb 10 '23 at 20:30
\setlength\headheight{26pt}in the document preamble, presumably where you have other fancyhdr settings. – David Carlisle May 29 '20 at 13:11\chapter[short title]{long title}to use a shorter title for the header and TOC. – John Kormylo May 29 '20 at 13:20