0

In the following 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}

the pagination of the front matter is divided into two groups, and the pattern of counting all pages and paginating only odd pages is not maintained.

How may these problems be resolved?

I would prefer it if all pages in front matter were paginated.

5
  • Sorry, but it's not clear what you want to achieve.
    – egreg
    Commented May 27, 2023 at 21:37
  • @egreg 1: The front matter has two pages numbered i. Commented May 27, 2023 at 21:49
  • @egreg There are other irregularities. I would like all pages to be with small Roman numeral. Commented May 27, 2023 at 21:52
  • 1
    Well, you have \pagenumbering{roman} before \frontmatter, which does again \pagenumbering{roman}.
    – egreg
    Commented May 27, 2023 at 22:00
  • @egreg Thanks, I figured it out now. Commented May 27, 2023 at 22:23

1 Answer 1

1

Here is an answer based upon a tip by @egreg in the comment section:


\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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .