0

Hi I am writing for a book. Header screen should be as follows.

enter image description hereenter image description here

\documentclass[12pt]{book}

\usepackage[top=25mm,bottom=25mm,left=25mm,right=25mm]{geometry}

\usepackage[all]{background}
\usepackage{amsthm}
\usepackage{afterpage}
\usepackage{xcolor}
\definecolor{myaqua}{rgb}{1,1,1}
\definecolor{myaqua1}{rgb}{0,0.5,0.45}
\usepackage{fancyhdr}
\usepackage{ptext,xcolor}
\usepackage{showframe}

\usepackage{tikz}
\usetikzlibrary{calc} 

\usepackage{changepage}
\strictpagecheck


\usepackage{fancyhdr}
\fancyhf{}
\fancyhead[LO,RE]{\thepage}
\fancyhead[LE]{عنوان کتاب}
\fancyhead[RO]{\leftmark}
\renewcommand{\headrulewidth}{0pt}
\pagestyle{fancy}


\usepackage{xepersian}
\settextfont[Scale=1.2]{Yas} 
\linespread{1.5}

\newcommand*{\vsp}{2cm}
\newcommand*{\hsp}{2.5cm}

\newcommand{\MyTikzLogo}{% 
\begin{tikzpicture}[remember picture,overlay]
\checkoddpage
\ifoddpage
    \draw  [color=magenta,line width=2mm] ($(\paperwidth+\hsp,-\vsp)$) --($(\hsp,-\vsp)$);
\else
    \draw  [color=cyan,line width=1mm] ($(0,-\vsp)$) --($(\paperwidth-\hsp,-\vsp)$);
\fi
 \end{tikzpicture}
}

\SetBgContents{\MyTikzLogo}
\SetBgPosition{current page.north west}
\SetBgOpacity{1.0}
\SetBgAngle{0.0}
\SetBgScale{1.0}
\makeatletter
%\renewcommand \thechapter {\@tartibi\c@chapter}
\def\@makechapterhead#1{%
    \vspace*{250\p@}%
    {\parindent \z@ \if@RTL\raggedleft\else\raggedright\fi \normalfont
        \ifnum \c@secnumdepth >\m@ne
        \if@mainmatter
        \huge\bfseries \@chapapp\space \thechapter
        \par\nobreak
        \vskip100\p@
        \fi
        \fi    
        \interlinepenalty\@M
        \Huge \bfseries #1\par\nobreak
        \vskip 10\p@
}}
\makeatother
\begin{document}

\chapter{عنوان فصل}
%\pagecolor{myaqua1}\afterpage{\nopagecolor}
\pagecolor{myaqua1}\afterpage{\nopagecolor}
\newpage
\pagecolor{myaqua}\afterpage{\nopagecolor}
\section{عنوان بخش}

%\ptext[1-40]
\begin{tikzpicture}[remember picture,overlay]
\checkoddpage
\ifoddpage
\draw  [color=magenta,line width=2mm] ($(\paperwidth+\hsp,-\vsp)$) --($(\hsp,-\vsp)$);
\else
\draw  [color=cyan,line width=1mm] ($(0,-\vsp)$) --($(\paperwidth-\hsp,-\vsp)$);

\fi
\end{tikzpicture}


\end{document}

0 Answers0