布局 - 如何创建个性化的标题布局?

布局 - 如何创建个性化的标题布局?

我正在写一篇论文,我想将我的标题个性化,就像这张图片一样: 图像

第一次(1):

  • 在偶数页上,我希望左边显示页码,右边显示章节名称。
  • 在奇数页上,我希望左侧显示当前节和当前小节,右侧显示页码。

这是我的标题配置代码:

% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % 
% HEADERS AND FOOTERS
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
\renewcommand{\baselinestretch}{1.05}
\usepackage{fancyhdr}

\pagestyle{fancy}
\let\Sectionmark\sectionmark
\def\sectionmark#1{\def\Sectionname{#1}\Sectionmark{#1}}
\let\Subsectionmark\subsectionmark
\def\subsectionmark#1{\def\Subsectionname{#1}\Subsectionmark{#1}}

\renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter. #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ \ #1}{}}
\fancyhead{}
\fancyfoot{}

% page pair
\fancyhead[LE]{\textbf{\thepage}\hspace{3pt}{\color{MyGrey}\greytriangleright}\hspace{3pt} \\{}}
\fancyhead[RE]{\MakeUppercase{\leftmark} \\{}}

%page impair
\fancyhead[LO]{\nouppercase{\rightmark \\{} \thesubsection\ \Subsectionname}}
\fancyhead[RO]{\hspace{3pt}{\color{MyGrey}\greytriangleleft}\hspace{3pt}\textbf{\thepage} \\{}}

\setlength{\headheight}{45pt}

\let\headruleORIG\headrule
\renewcommand{\headrule}{\color{black} \headruleORIG}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}

\fancypagestyle{plain}{
  \fancyhead{}
  \fancyfoot[C]{\bfseries\thepage}
  \renewcommand{\headrulewidth}{0pt}
  \renewcommand{\footrulewidth}{0pt}
}

\makeatletter
\def\@textbottom{\vskip \z@ \@plus 1pt}
\let\@texttop\relax
\makeatother

% % Clear Header Style on the Last Empty Odd pages
\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else%
\hbox{}%
\thispagestyle{empty}% % Empty header styles
\newpage%
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother

第二次(2),我如何在页面外部边缘创建一个区域来标记当前章节?

感谢您的帮助。

相关内容