0

The position of the page number is changing within the same chapter. Specifically, the first page is shown correctly (on the bottom of the page), but the rest of that chapter is shown on the bottom top right.

I want the page number to be shown on the right bottom for the entire text!

MVE

\documentclass[12pt,a4paper]{report}
\usepackage[pdftex]{graphicx}
\usepackage{url} 
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amssymb}
\setlength{\parindent}{0.5cm}
\usepackage{float}
\usepackage{footnote}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage[bookmarks, colorlinks=true, pdfborder={0 0 0}, pdftitle={Internship report}, pdfauthor={Kristjan Qarri}, pdfsubject={Internship report}, pdfkeywords={<keywords here>}]{hyperref} 
\usepackage[pagestyles]{titlesec}
\titleformat{\chapter}[display]{\normalfont\bfseries}{}{0pt}{\Huge}
\newpagestyle{mystyle}
{\sethead[\thepage][][\chaptertitle]{}{}{\thepage}}
\pagestyle{mystyle}
%%%%%%%%%%%%%
% add references in the TOC
\usepackage[nottoc,numbib]{tocbibind}
%%%%%%%%%%%
% acronyms
\usepackage[acronym,nomain,nonumberlist]{glossaries}
\makeglossaries

\newacronym{iso}{ISO}{international organization for standardization}
\newacronym{la}{LA}{Los Angeles}
\newacronym{un}{UN}{United Nations}
% end of file

\include{sections/Introduction}


\begin{document}
\tableofcontents

\chapter{Chapter 1}
\blindtext
\blindtext
\blindtext
\section{Section 1}
\blindtext
\blindtext
\blindtext

\chapter{Chapter 2}
\blindtext
\section{Section 1}
\blindtext
\blindtext
\blindtext
\end{document}

Link to the project file

This is what the page nr position looks like.

3
  • 6
    that is the standard behaviour, chapter openings are shown with \thispagestyle{plain} so that they have an empty header and put the page number at the bottom, leaving the top free for a fancy title layout. The fancyhdr package gives easy commands to customise the page head and foot on normal and chapter opening pages (look for fancyplain in the manual) Commented Feb 11, 2021 at 9:39
  • Note that you are using titlesec to create mystyle. Commented Feb 11, 2021 at 16:24
  • I solved it by disabling the header option. That puts by default the page nr on the bottom of the page for all pages of the chapter.
    – KrisQ
    Commented Feb 13, 2021 at 23:38

1 Answer 1

1

The solution is shown in the code

\documentclass[12pt,a4paper]{report}
\usepackage[pdftex]{graphicx}
\usepackage{url} 
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amssymb}
\setlength{\parindent}{0.5cm}
\usepackage{float}
\usepackage{footnote}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage[bookmarks, colorlinks=true, pdfborder={0 0 0}, pdftitle={Internship report}, pdfauthor={Kristjan Qarri}, pdfsubject={Internship report}, pdfkeywords={<keywords here>}]{hyperref} 
\usepackage[pagestyles]{titlesec}
\titleformat{\chapter}[display]{\normalfont\bfseries}{}{0pt}{\Huge}
%% Change from here
%\newpagestyle{mystyle}{\sethead[\thepage][][\chaptertitle]{}{}{\thepage}}
%\pagestyle{mystyle}
%%%%%%%%%%%%%
% add references in the TOC
\usepackage[nottoc,numbib]{tocbibind}
%%%%%%%%%%%
% acronyms
\usepackage[acronym,nomain,nonumberlist]{glossaries}
\makeglossaries

\newacronym{iso}{ISO}{international organization for standardization}
\newacronym{la}{LA}{Los Angeles}
\newacronym{un}{UN}{United Nations}
% end of file
% Kristjan Qarri
\usepackage{array}
\usepackage{makecell}
\usepackage{multirow}

\begin{document}
\tableofcontents

\chapter{Chapter 1}
\blindtext
\blindtext
\blindtext
\section{Section 1}
\blindtext
\blindtext
\blindtext

\chapter{Chapter 2}
\blindtext
\section{Section 1}
\blindtext
\blindtext
\blindtext
\end{document}

You must log in to answer this question.

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