1

How to add page numbers at the bottom center of page in LYX? The page numbers are not coming properly. The document class is book. By adding the following code in preamble

\usepackage{scrpage2}
\pagestyle{scrheadings}
\ofoot{\arabic{page}}
\ohead{}

The page numbers come at the bottom. but not at the center. how to center the page numbers?

  • Use \cfoot instead \ofoot: \cfoot{\pagemark}. – esdd Dec 31 '15 at 13:47
  • the solution worked. In my chapter the name of the chapter appears in the header. How can that be removed? – user87834 Dec 31 '15 at 13:54
  • How to decrease the font size of chapter name in header? Another question is if I use the package underline to underline the header, page number appears along with it. How to remove the page number? – user87834 Jan 1 '16 at 6:51
  • To change the fontsize in header you can use \addtokomafont{pagehead}{...} or \setkomafont. But I thought you want to remove the chapter name from header? Regarding underline please ask a new question with a MWE. – esdd Jan 1 '16 at 10:09
4

I suggest to use package scrlayer-scrpage that is the successor of scrpage2:

\documentclass{book}
\usepackage{blindtext}% dummy text

\usepackage{scrlayer-scrpage}
\clearpairofpagestyles
\cfoot*{\pagemark}

\begin{document}
\blinddocument
\end{document}

Note that scrlayer-scrpage sets the page stlye scrheadings by default.


With scrpage2:

\documentclass{book}
\usepackage{blindtext}% dummy text

\usepackage{scrpage2}
\pagestyle{scrheadings}
\clearscrheadfoot
\cfoot[\pagemark]{\pagemark}

\begin{document}
\blinddocument
\end{document}
  • is there a pagestyle other than scrheadings to include chapter names at the top/bottom of the page? – Sparkler Jan 24 '17 at 19:13
  • @Sparkler Using scrlayer-scrpage you can define a your own new page style. But why? Or do you want to use a different package like fancyhdr? Maybe its better to ask a new question with a MWE for your problem. – esdd Jan 24 '17 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.