感谢@u64726 提供的思路,微调了一下...
\documentclass[b5paper,twoside,openany,UTF8]{ctexbook}
\usepackage{zhlipsum}
\usepackage{zhnumber}
\ctexset{
chapter/name = {,},
chapter/number = {\makebox[5\ccwd][s]{第\chinese{chapter}回}},
}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[CO]{\zihao{5}\rightmark}
\fancyhead[CE]{\zihao{5}\leftmark}
\fancyfoot[RO]{--~\thepage~--}
\fancyfoot[LE]{--~\thepage~--}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\chaptermark}[1]{%
\markboth{\makebox[5\ccwd][s]{第\zhnumber{\thechapter}回}}{#1}
}
% 章节首页样式(无页眉和页眉横线,仅保留页码)
% 这是由于在book.cls中,章节首页预定义了样式 \thispagestyle{plain}
% 因此此处重定义 plain 样式相当于重定义了 章节首页
\fancypagestyle{plain}{%
\fancyhf{}
\fancyfoot[RO]{--~\thepage~--}
\fancyfoot[LE]{--~\thepage~--}
\renewcommand{\headrulewidth}{0pt}
}
\begin{document}
\tableofcontents
\chapter{这是一个标题名1}\zhlipsum[1-6]
\addtocounter{chapter}{9}
\chapter{这是一个标题名2}\zhlipsum[1-6]
\addtocounter{chapter}{9}
\chapter{这是一个标题名3}\zhlipsum[1-6]
\end{document}
(有没有什么方便的同时展现10+个pdf页面的截图方式啊...上图至少微调了2分钟大小...)
问 latex排版文字时,如何让第一回、第二回、……第二十一回在页眉和目录中占据相同的宽度,文字分散对齐?