如何用罗马数字开始前言?

如何用罗马数字开始前言?

我的 pdf 的编号不是以罗马数字开头的,原则上,罗马数字与前言相对应。我该如何解决这个问题?这是我的 MWE:

\documentclass[hidelinks,12pt,twoside,openright,a4paper]{book}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{setspace}
\usepackage{lipsum}

\usepackage{tocloft}

%%%% center part titles
\renewcommand{\cftpartfont}{\hfil\bfseries}
\renewcommand{\cftpartleader}{\hfil}

\setlength{\cftbeforechapskip}{3pt}%espace entre chapitres
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}} % for chapters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{fancyhdr}

\pagestyle{fancy}
% We don’t want chapter and section numbers
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\headrulewidth}{0pt}
\fancyhf{} % sets both header and footer to nothing
\fancyfoot{}
\fancyhead[LE,RO]{\thepage}
\fancyhead[CE]{\textit{A title}} % even pages: chapter title
\fancyhead[CO]{\textit\leftmark} % odd pages: book title

\setlength{\headheight}{15pt} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\title{A title}
\author{A name}
\date{}
\maketitle

\tableofcontents
    
\frontmatter
\chapter{A chapter}
\lipsum
    
\mainmatter
\part{How to customize a part section?}
\chapter{Another chapter}
\lipsum

\backmatter

\chapter{A chapter}

\end{document}

答案1

正如@egreg 正确建议的那样,\frontmatter 必须放在 \maketitle 之前。

相关内容