## LaTeX forum ⇒ Page Layout ⇒ page number Topic is solved

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
fhrttn
Posts: 10
Joined: Thu Nov 16, 2017 2:43 pm

### page number

I can not give page number on chapter page. Latex gives page number the page after the chapter page. Also there is a margin problem between chapter page and second page. I attached the pdf ,If you want I can upload the cls file to
Attachments
thesis.pdf

Tags:

Johannes_B
Site Moderator
Posts: 3724
Joined: Thu Nov 01, 2012 4:08 pm
A minimal working example would be most helpful.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Stefan Kottwitz
Posts: 8783
Joined: Mon Mar 10, 2008 9:44 pm
Welcome to the forum!

Indeed, for being able to help we need to see code. As minimum, the .cls file and the preamble of the .tex file with the settings.

Stefan

fhrttn
Posts: 10
Joined: Thu Nov 16, 2017 2:43 pm
I attached cls
Attachments
ni.cls

fhrttn
Posts: 10
Joined: Thu Nov 16, 2017 2:43 pm
and the .tex (I forgot it )
Attachments
thesis.tex

Stefan Kottwitz
Posts: 8783
Joined: Mon Mar 10, 2008 9:44 pm
The class file ni.cls sets the page style to "empty" when a chapter starts. You can change it this way, adding this to your preamble in thesis.tex:

\usepackage{etoolbox}\makeatletter\patchcmd{\@makechapterhead}{empty}{plain}{}{}\makeatother

To reset the settings that the class makes at the beginning of the document, you can insert before \makeatletter above:

\let\@begindocumenthook\relax

You can see what the class makes when you search for \AtBeginDocument in ni.cls. You can choose some settings and make them yourself, after \begin{document}. The \setlength commands cause the margin behavior. Instead of this, I suggest \usepackage[...]{geometry} with some meaningful options, see geometry manual.

Stefan