Удалить верхнюю линейку с определенной страницы или с титульного листа главы и сохранить нижнюю линейку

Удалить верхнюю линейку с определенной страницы или с титульного листа главы и сохранить нижнюю линейку

я попробовал этот ответ здеськласс мемуаровно в моем случае это не работает, мне удалось удалить заголовок, но не удалось удалить правило заголовка, вот мой MWE:

\documentclass[10pt,a4paper]{book}
\usepackage{xcolor}
\usepackage{fancyhdr}
\usepackage{etoolbox}
\patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{}%to make chapter's first page fancy
\usepackage{fancyhdr}%to add horizental link to header&foofter
\pagestyle{fancy}
\fancyhf{}
\fancyfoot[LE,RO]{\thepage}
\fancyhead[RE]{\footnotesize\itshape header}      
\fancyhead[LO]{\leftmark}
\renewcommand{\footrulewidth}{0.2pt}%the widht of header line
\renewcommand{\headrulewidth}{0.2pt}%the widht of header line
%==========to make chapter title fancy===========
\usepackage{titlesec}
\makeatletter%to make chapter titles fancy
\titleformat{\chapter}[frame]
{\normalfont}{\filright\enspace \@chapapp~\thechapter\enspace}
{20pt}{\Huge\bfseries\filcenter}%20pt the small line that close the box
\titlespacing*{\chapter}
{0pt}{-20pt}{20pt}%{}{between header and box}{space after box}
\makeatother
%====to remove the header====
\fancypagestyle{nofooter}{%
\fancyfoot{}%
}
\fancypagestyle{noheader}{%
\fancyhead{}%
}
\usepackage{lipsum}
\begin{document}
\chapter{Head rule}
\thispagestyle{noheader}%
\lipsum[1]
\section{Head rule}
\lipsum[1]
\end{document}

Фигура

решение1

Вы можете сделать это, сделав width=0

\renewcommand{\headrulewidth}{0.0pt}

решение2

Мне удалось решить эту проблему, поэкспериментировав и настроив стиль страницы Plain с помощью ответа отсюдасвязь

\documentclass[10pt,a4paper]{book}
\usepackage{xcolor}
\usepackage{fancyhdr}
\usepackage{etoolbox}
%\patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{}%to make chapter's first page fancy
\usepackage{fancyhdr}%to add horizental link to header&foofter
\pagestyle{fancy}
\fancyhf{}
\fancyfoot[LE,RO]{\thepage}
\fancyhead[RE]{\footnotesize\itshape header}      
\fancyhead[LO]{\leftmark}
\renewcommand{\footrulewidth}{0.2pt}%the widht of header line
\renewcommand{\headrulewidth}{0.2pt}%the widht of header line
%==========to make chapter title fancy===========%

\usepackage{titlesec}
\makeatletter%to make chapter titles fancy
\titleformat{\chapter}[frame]
{\normalfont}{\filright\enspace \@chapapp~\thechapter\enspace}
{20pt}{\Huge\bfseries\filcenter}%20pt the small line that close the box
\titlespacing*{\chapter}
{0pt}{-20pt}{20pt}%{}{between header and box}{space after box}
\makeatother
%==========Custmizing plain page style==========%
\fancypagestyle{plain}{
\fancyhf{} %Clear Everything.
\fancyfoot[L]{\thepage} %Page Number
\renewcommand{\headrule}{\hrule height 0pt \vspace{0mm}\hrule height 0pt}
\renewcommand{\footrulewidth}{1pt}
\fancyfoot[C]{}
\fancyfoot[R]{}
\fancyhead[LE]{}
\fancyhead[RO]{}
}
%%%%%%
%====to remove the header====
\fancypagestyle{nofooter}{%
\fancyfoot{}%
}
\fancypagestyle{noheader}{%
\fancyhead{}%
}
\usepackage{lipsum}
\begin{document}
\chapter{Head rule}
%\thispagestyle{noheader}%
\lipsum[1]
\section{Head rule}
\lipsum[1]
\end{document}

В моем случае я использую разные четные и нечетные страницы, поэтому не забудьте вручную переместить номер страницы в зависимости от предыдущей и последующей страницы.

Связанный контент