假设我想写一份包含摘要、致谢、三个章节、两个附录和一份法定声明的文件。
特此...
- 摘要和致谢应按以下
Roman
格式编号 Arabic
第 1 至 3 章应按以下格式编号- 附录应按
Roman
格式编号 - 法定声明应按以下
Arabic
格式编号
最小工作示例(MWE):
\documentclass[oneside]{scrbook}
\usepackage{appendix}
\newcounter{savepage}
\begin{document}
\cleardoublepage
\pagenumbering{Roman}
\chapter{Abstract}% Roman numbering
\chapter{Acknowledgements}% Roman numbering
\cleardoublepage
\setcounter{savepage}{\arabic{page}}
\pagenumbering{arabic}
\chapter{The first chapter}% Arabic numbering
\chapter{The second chapter}% Arabic numbering
\chapter{The third chapter}% Arabic numbering
\cleardoublepage
\pagenumbering{Roman}
\setcounter{page}{\thesavepage}
\begin{appendices}
\chapter{The first appendix}% Roman numbering
\chapter{The second appendix}% Roman numbering
\end{appendices}
\cleardoublepage
\pagenumbering{arabic}
\chapter{Statutory declaration}% Arabic numbering
\end{document}
上述 MWE 在编号样式方面运行良好。但是,这种方法会将page counter
法定声明的页码重置为第 1 页(尽管应该是第 4 页)。
我如何引入第二条\setcounter
命令来继续Arabic
对法定声明进行编号?
答案1
这是一个令人困惑的编号方案...
\documentclass[oneside]{scrbook}
\usepackage{appendix}
\newcounter{savepageRoman}
\newcounter{savepagearabic}
\begin{document}
\cleardoublepage
\pagenumbering{Roman}
\chapter{Abstract}% Roman numbering
\chapter{Acknowledgements}% Roman numbering
\cleardoublepage
\setcounter{savepageRoman}{\value{page}}
\pagenumbering{arabic}
\chapter{The first chapter}% Arabic numbering
\chapter{The second chapter}% Arabic numbering
\chapter{The third chapter}% Arabic numbering
\cleardoublepage
\setcounter{savepagearabic}{\value{page}}
\pagenumbering{Roman}
\setcounter{page}{\value{savepageRoman}}
\begin{appendices}
\chapter{The first appendix}% Roman numbering
\chapter{The second appendix}% Roman numbering
\end{appendices}
\cleardoublepage
\pagenumbering{arabic}
\setcounter{page}{\value{savepagearabic}}
\chapter{Statutory declaration}% Arabic numbering
\end{document}
我建议使用\frontmatter
、\mainmatter
和\backmatter
:\appendix
\documentclass[oneside]{scrbook}
\begin{document}
\frontmatter
%\pagenumbering{Roman}% <- pagenumbers Roman instead roman
\chapter{Abstract}
\chapter{Acknowledgements}
\tableofcontents
\mainmatter
\chapter{The first chapter}
\chapter{The second chapter}
\chapter{The third chapter}
\appendix
\chapter{The first appendix}
\chapter{The second appendix}
\backmatter
\chapter{Statutory declaration}
\end{document}