با سلام و احترام
پیرو سوال مطرح شده، چگونه میتوان همین کار را در هدرهای صفحات افقی انجام داد؟
لازم به توضیح است که محیطی به نام LandScape
برای این کار تعریف شدهاست.
میخواهم که کل عرض هدر با عرض مطالب یکسان باشد.
% arara: xelatex
% arara: xelatex
% arara: clean1
\documentclass[twoside]{report}
\usepackage{tikz}
\usepackage[margin=2.5cm,headheight=60pt,includeheadfoot,showframe]{geometry}
\usepackage[]{graphicx}
\usepackage[absolute]{textpos}
\usepackage{fancyhdr,lscape}
\pagestyle{fancy}
\usepackage{xcolor}
\usepackage{ptext}
% \renewcommand{\headrulewidth}{2pt}% 2pt header rule
% \renewcommand{\headrule}{\hbox to\headwidth{%
% \color{red}\leaders\hrule height \headrulewidth\hfill}}
% \renewcommand{\footrulewidth}{0pt}% No footer rule
\usepackage{xepersian}
\settextfont{XB Yas}
\defpersianfont\titr[Scale=1.2]{XB Titre}
\fancyhf{}
\fancyhead[CO]
{%
\begin{tikzpicture}
\draw [color=orange, very thick, anchor=south]
node (left) [anchor=west,] {\includegraphics[width = 1.5cm]{IUSTLogoColor}}
(left.east) -- (\textwidth,0)
node (booq) [anchor=east, fill=white, xshift=2pt] {\includegraphics[ width = 2cm]{TazhibRight}}
{};
\node (B) at (0,0) {};
\node (A) at (13,-.5) { \rl{\titr \footnotesize \leftmark}};
\node (C) at (3,-.5) {\rl{ \titr \footnotesize \thepage}};
\end{tikzpicture}%
}
\fancyhead[LE]{
\begin{tikzpicture}
\draw [color=orange, very thick, anchor=south]
node (left) [anchor=west,] {\includegraphics[width = 2cm]{TazhibLeft}}
(left.east) -- (\textwidth,0)
node (booq) [anchor=east, fill=white, xshift=2pt] {\includegraphics[ width = 1cm]{IdasLogo}}
{};
\node (B) at (0,0) {};
\node (A) at (13,-.5) { \rl{\titr \footnotesize \leftmark}};
\node (C) at (3,-.5) {\rl{ \titr \footnotesize \thepage}};
\end{tikzpicture}%
}% Set blue background
\fancypagestyle{lscape}{%
\fancyhf{} % clear all header and footer fields
\fancyfoot[LE]{%
\begin{textblock}{1}(13,10.5){\rotatebox{90}{ زوج \thepage}}\end{textblock}}
\fancyfoot[LO] {%
\begin{textblock}{1}(13,10.5){\rotatebox{90}{فرد\thepage}}\end{textblock}}
\fancyhead[LE]{
\begin{textblock}{1}(1,2.8){\rotatebox{90}{
\raisebox{-.5\height}{\includegraphics[width = 1.5cm]{IUSTLogoColor}}
\hfill
\color{orange}{\rule{11\textwidth}{0.05cm}}
\hfill
\raisebox{-.5\height}{\includegraphics[ width = 2cm]{TazhibLeft}}
}}\end{textblock}}
%\fancyhead[LO]{
%\begin{textblock}{1}(1,2.8){\rotatebox{90}{
%\raisebox{-.5\height}{\includegraphics[width = 2cm]{TazhibRight}}
%\hfill
%\color{orange}{\rule{11\textwidth}{0.05cm}}
%\hfill
% \raisebox{-.5\height}{ \includegraphics[ width = 1cm]{IdasLogo.png}}
%}}\end{textblock}}
\fancyhead[LO]{
\begin{textblock}{1}(1,2.8){\rotatebox{90}{
\begin{tikzpicture}
\draw [color=orange, very thick, anchor=south]
node (left) [anchor=west] {\includegraphics[width = 2cm]{TazhibLeft}}
(left.east) -- (18cm,0)
node (booq) [anchor=east, fill=white, xshift=-50pt] {\includegraphics[width = 1cm]{IdasLogo}}
{};
\node (B) at (0,0) {};
\node (A) at (13,-.5) { \rl{\titr \footnotesize \leftmark}};
\node (C) at (3,-.5) {\rl{ \titr \footnotesize \thepage}};
\end{tikzpicture}%
}}\end{textblock}}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}
\newenvironment{LandScape}
{\newgeometry{hmargin=4cm,vmargin=3cm}
\thispagestyle{lscape}
\pagestyle{lscape}
\begin{landscape}}
{\end{landscape}}
\begin{document}
\chapter{یک عنوان فصل}
\ptext[1-25]
\begin{LandScape}
\ptext[1-25]
\end{LandScape}
\ptext[1-25]
\end{document}
خروجی فعلی: