3

Using scrpage2 with scrbook, how can I make it so that there is no footer on the last pages of a chapter (so that the white is not interrupted)?

raphink
  • 31,894
  • With "last pages", do you mean blank even pages before new chapter-starting odd pages? – lockstep Jun 11 '11 at 20:41
  • 1
    @lockstep: the guidelines for French typography specify that page numbers in footer have to be removed at the end of partial pages finishing chapters. – raphink Jun 11 '11 at 20:51

2 Answers2

5

I would suggest

 \usepackage{etoolbox}
 \preto\chapter{\thispagestyle{endchapterstyle}}

where endchapterstyle is a page style defined as the normal one, but with empty footer.

The command \chapter has the responsibility to clear the page. But a direct command \thispagestyle{endchapterstyle} might be preferable. Or

\newcommand{\closechapter}{\thispagestyle{endchapterstyle}}

so that you can change your mind later and leave in place \closechapter after having redefined it.

egreg
  • 1,121,712
  • Right. I'm actually using an \input for each chapter, so I could probably call \thispagestyle{endchapterstyle} after each call to \input. That said, I've already defined scrplain and scrheadings. How can I add more styles? – raphink Jun 11 '11 at 20:52
  • @Raphink: from page 141 in the KoMaScript manual. – egreg Jun 11 '11 at 21:02
  • @Raphink: the \\ is ignored as the footer is typeset in horizontal mode; use \parbox[t]{6mm}{\hrule\vspace{2pt}\centering\pagemark} – egreg Jun 11 '11 at 21:45
  • thanks. As you can see, I actually decided to go with \defstyle instead, and it works really well :-) – raphink Jun 11 '11 at 21:47
  • Note: I've had cases of short last pages where the style was applied to the last-but-one page instead of the last one. To prevent this, I now use: \mbox{}\hfill\thispagestyle{endchapterstyle} to make sure the style is applied to the last page. – raphink Jul 05 '11 at 05:41
1

For the record, here is my implementation of @egreg's answer:

\cfoot[\rule{6mm}{0.8pt}\\\pagemark]{\rule{6mm}{0.8pt}\\\pagemark}              
\ofoot[]{}                                                                      
\lehead[]{}                                                                     
\cehead[\headerfont\textsc{\titlehead}]{}                                     
\cohead[\headerfont\textsc{\chaphead}]{}                                      
\ohead[]{}                                                                      

\defpagestyle{chapterend}%                                                      
  {%                                                                            
    {\hfill\headerfont\textsc{\titlehead}\hfill}                                
    {\hfill\headerfont\textsc{\chaphead}\hfill}                                 
    {}                                                                          
  }%                                                                            
  {{}{}{}} % Nothing in footer                                                  

\renewcommand*{\chapterpagestyle}{scrheadings}                                  

\newcommand{\closechapter}{\thispagestyle{chapterend}}      
raphink
  • 31,894