I have a problem with the footer ruler on the first page of each chapter, it doesn't show whilst for the the second and following page of each chapter the ruler occurs.
I found the answer: https://tex.stackexchange.com/a/344092/44119 but this is for a scrreprt and I use book. In book the \chapterpagestyle does not exist.
The first page:
The subsequent pages:
My MWE:
\documentclass[twoside]{book}
\usepackage{lipsum}
\usepackage{fancyhdr}
\pagestyle{fancyplain}
\fancyhead[LE]{\fancyplain{}{\bfseries\thepage}}
\fancyhead[CE]{\fancyplain{}{}}
\fancyhead[RE]{\fancyplain{}{\bfseries\leftmark}}
\fancyhead[LO]{\fancyplain{}{\bfseries\rightmark}}
\fancyhead[CO]{\fancyplain{}{}}
\fancyhead[RO]{\fancyplain{}{\bfseries\thepage}}
\fancyfoot[LE]{\fancyplain{\bfseries\thepage}{\bfseries\thepage}}
\fancyfoot[CE]{\fancyplain{}{}}
\fancyfoot[RE]{\fancyplain{\bfseries\scriptsize Generated }{\bfseries\scriptsize Generated }}
\fancyfoot[LO]{\fancyplain{\bfseries\scriptsize Generated }{\bfseries\scriptsize Generated }}
\fancyfoot[CO]{\fancyplain{}{}}
\fancyfoot[RO]{\fancyplain{\bfseries\thepage}{\bfseries\thepage}}
\renewcommand{\footrulewidth}{0.4pt}
\begin{document}
\chapter{My Chapter}
\lipsum[1]
\newpage
\lipsum[1]
\newpage
\lipsum[1]
\end{document}
So my question is how to solve this:
- what is the alternative for
\chapterpagestyleinbook
or
- how to directly solve it in the given MWE?



\fancypagestyle{plain}{\pagestyle{fancyplain}}should work. – Ulrike Fischer Oct 09 '20 at 09:41\pagestyle{fancyplain}at line 4 with\fancypagestyle{plain}{\pagestyle{fancyplain}}it does show the footer ruler on the first page, but has as effect that I get a header on page 1, no footers on subsequent pages and the header ruler is gone at the pages 2 and further. – albert Oct 09 '20 at 09:50\fancypagestyle{plain}{\pagestyle{fancyplain}}after\pagestyle{fancyplain}, looks a bit better, but now I get a header on page 1 of the chapter, which I wouldn't like to have. – albert Oct 09 '20 at 10:02\fancypagestyle{plain}{\pagestyle{fancyplain}\fancyhead{}}. Basically you have to redefine plain style, see the fancyhdr documentation. – Ulrike Fischer Oct 09 '20 at 10:05