Frontmatter 分页问题

Frontmatter 分页问题

在以下 MWE 中,

\documentclass[12pt]{book}

\usepackage{afterpage}
\usepackage{epigraph}

\usepackage{fancyhdr}
\setlength{\headheight}{27.15pt}
\pagestyle{fancy}

\newcommand\blankpage{%
    \null
    \thispagestyle{empty}%
    \addtocounter{page}{-1}%
    \newpage}

\newcounter{mycounter}

\setcounter{mycounter}{0}

\begin{document}

\begin{titlepage} 

A title\\
and its subtitle

\afterpage{\blankpage}      

\end{titlepage}

\afterpage{\blankpage}      

\pagenumbering{roman}

\indent Copyright \textcopyright\ 2023 The author All rights reserved.

\frontmatter

\newpage

\begin{center}
\(\mathit{for \ my \ partner}\) 
\end{center}

\chapter{Preface}

\newpage

\chapter{Acknowledgements}

\newpage

\thispagestyle{empty}
\tableofcontents
\setcounter{tocdepth}{2}

\chapter{Introduction } 

\medskip
\
\setlength{\epigraphwidth}{0.16\textwidth}

\epigraph{An epigraph}

\mainmatter

\chapter{The formal language}

\end{document}

前页的页码分为两组,不保留统计所有页面和仅对奇数页进行分页的模式。

这些问题如何解决?

我希望前言的所有页面都分页。

答案1

以下是根据评论部分@egreg 的提示给出的答案:


\documentclass[12pt]{book}

\usepackage[greek,english]{babel}

\usepackage{hyperref}

\usepackage{afterpage}
\usepackage{epigraph}

\usepackage{fancyhdr}
\setlength{\headheight}{27.15pt}
\pagestyle{fancy}

\newcommand\blankpage{%
    \null
    \thispagestyle{empty}%
    \addtocounter{page}{0}%
    \newpage}

\newcounter{mycounter}

\setcounter{mycounter}{1}

\begin{document}
    
    \begin{titlepage} 
        
        A title\\
        and its subtitle
        
        \afterpage{\blankpage}      

    \end{titlepage}
    
    \frontmatter    
    \pagenumbering{roman}


    
    \indent Copyright \textcopyright\ 2023 The author All rights reserved.
    
    
    \newpage
    
    \begin{center}
        \(\mathit{for \ my \ partner}\) 
    \end{center}
    
    \chapter{Preface}
    
    \newpage
    
    \chapter{Acknowledgements}
    
    \newpage
    

    \tableofcontents
    \setcounter{tocdepth}{2}
    
    \chapter{Introduction } 
    
    \medskip
    \
    \setlength{\epigraphwidth}{0.16\textwidth}
    
    \epigraph{An epigraph}
    
    \mainmatter
    
    \chapter{The formal language}
    
\end{document}

相关内容