Use only arabic numbers in book class

bookstable of contents

I am writing a book with extbook class.
In the TOC frontmatter uses roman numerals, mainmatter uses arabic numbers.
Publisher asked if I could use only arabic numbers everywhere including in frontmatter.

Is there easy way to do it? If I move preface into mainmatter it adds chapter numbers which is not what I want.

Best Answer

I guess your publisher wants continuous numbering: it wouldn't really make sense to have two pages numbered 1, one in the front matter and the other in the main matter.

The definitions in the book class are

\newcommand\frontmatter{%
  \cleardoublepage
  \@mainmatterfalse
  \pagenumbering{roman}%
}
\newcommand\mainmatter{%
  \cleardoublepage
  \@mainmattertrue
  \pagenumbering{arabic}%
}

so you just have to modify them

\documentclass{book}

\makeatletter
\renewcommand\frontmatter{%
  \cleardoublepage
  \@mainmatterfalse
  \pagenumbering{arabic}% <--- changed here
}
\renewcommand\mainmatter{%
  \cleardoublepage
  \@mainmattertrue
  %\pagenumbering{arabic}% <--- removed
}
\makeatother