![布局 - 如何创建个性化的标题布局?](https://linux22.com/image/452869/%E5%B8%83%E5%B1%80%20-%20%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E4%B8%AA%E6%80%A7%E5%8C%96%E7%9A%84%E6%A0%87%E9%A2%98%E5%B8%83%E5%B1%80%EF%BC%9F.png)
第一次(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),我如何在页面外部边缘创建一个区域来标记当前章节?
感谢您的帮助。