svmono クラスのページ番号の位置を変更する

svmono クラスのページ番号の位置を変更する

タイトルのとおり、ページ番号を中央に配置するにはクラスをどのように変更すればよいかを知りたいですsvmono(現在はページの左上/右上にあります)。

ご意見は大歓迎です。
ご協力ありがとうございます。

答え1

bchapとページ スタイルの両方を再定義する必要がありますheadings

\documentclass[envcountsame,envcountchap]{svmono}
\usepackage{kantlipsum}

\makeatletter
\def\ps@bchap{%
  \let\@oddhead\@empty\let\@evenhead\@empty
  \def\@oddfoot{\reset@font\small\hfil\thepage\hfil}%
  \let\@evenfoot\@oddfoot
}

\def\ps@headings{%
  \let\@mkboth\markboth
  \def\@oddfoot{\reset@font\small\hfil\thepage\hfil}%
  \let\@evenfoot\@oddfoot
  \def\@evenhead{\runheadsize\runheadstyle\hfil\leftmark}%
  \def\@oddhead{\runheadsize\runheadstyle\rightmark\hfil}%
  \def\chaptermark##1{%
    \markboth{%
      {\if@chapnum\thechapter\thechapterend\hskip\betweenumberspace\fi ##1}%
    }{%
      {\if@chapnum\thechapter\thechapterend\hskip\betweenumberspace\fi ##1}}%
    }%
  \def\sectionmark##1{%
    \markright{%
      {\ifnum\c@secnumdepth>\z@\thesection\seccounterend\hskip\betweenumberspace\fi ##1}%
    }%
  }%
}
\makeatother
\pagestyle{headings}


\begin{document}

\chapter{Test}

\kant[1-10]

\end{document}

関連情報