![限制 \renewcommand{\chaptername}{} 仅适用于一个部分](https://linux22.com/image/405177/%E9%99%90%E5%88%B6%20%5Crenewcommand%7B%5Cchaptername%7D%7B%7D%20%E4%BB%85%E9%80%82%E7%94%A8%E4%BA%8E%E4%B8%80%E4%B8%AA%E9%83%A8%E5%88%86.png)
答案1
您可以根据计数器的值在一开始定义名称part
。
\documentclass{book}
\usepackage[a6paper]{geometry} % to get a small image
\renewcommand{\chaptername}{%
\ifcase\value{part}%
Chapter\or % 0
Core\or % 1
QI\or % 2
GP\else % 3
Chapter % else
\fi
}
\counterwithin*{chapter}{part}
\begin{document}
\part{Core}
\chapter{Test}
\part{QI}
\chapter{Test}
\part{GP}
\chapter{Test}
\clearpage
\mbox{}
\end{document}