仅在一个部分中将章节编号设置为字母顺序

仅在一个部分中将章节编号设置为字母顺序

我需要获取特定章节的编号部分在我的文档中将数字改为字母。如何实现?

MWE 游乐场:

\documentclass[a4paper,12pt,twoside,onecolumn,openright,final]{memoir}

\usepackage{lipsum}

\makeatletter
\@addtoreset{chapter}{part}
\makeatother  

\begin{document}

\frontmatter

\tableofcontents

\mainmatter

\part{First part}

\chapter{First numbered chapter}
\lipsum[1]

\chapter{Second numbered chapter}
\lipsum[1]

\part{Second part}

% Set chapternum to Alpha here -- how?

\chapter{Alpha chapter A}
\lipsum[1]

\chapter{Alpha chapter B}
\lipsum[1]

% Reset chapternum to numeric -- how?

\part{Third part}

\chapter{Numbered again from 1}
\lipsum[1]

\end{document}

答案1

重新定义 \thechapter:

\documentclass[a4paper,12pt,twoside,onecolumn,openright,final]{memoir}

\usepackage{lipsum}

\makeatletter
\@addtoreset{chapter}{part}
\makeatother

\begin{document}

\frontmatter

\tableofcontents

\mainmatter

\part{First part}

\chapter{First numbered chapter}
\lipsum[1]

\chapter{Second numbered chapter}
\lipsum[1]

\part{Second part}

% Set chapternum to Alpha here -- how?
\renewcommand\thechapter{\Alph{chapter}}
\chapter{Alpha chapter A}
\lipsum[1]

\chapter{Alpha chapter B}
\lipsum[1]

% Reset chapternum to numeric -- how?

\part{Third part}
\renewcommand\thechapter{\arabic{chapter}}
\chapter{Numbered again from 1}
\lipsum[1]

\end{document}

相关内容