1

This is my first time posting so if my formatting is off, I'm more than happy to be corrected! I'm also far from a TeX expert, so please forgive my questionable terminology.

I'm trying to write a dissertation using the NotesTeX package in the report document class. Each time I make a new chapter, the page numbering resets to 1. Any ideas on why this might be the case and how to resolve it? Notably, I've attempted to follow both the solutions given in the answer here, as well as the discussion here with no success - After doing everything advised in the linked posts, the page numbering issues persisted.

I suspect, therefore, that this problem is related to the NotesTeX package. Here is an MWE:

\pdfminorversion=4\relax
\pdfobjcompresslevel=0\relax
\RequirePackage{pdf14}

\documentclass[12pt, a4paper,notitlepage]{report}

\usepackage{marginnote,sidenotes,fancyhdr,titlesec,geometry}
\usepackage[dvipsnames]{xcolor}
\usepackage[many]{tcolorbox}
\usepackage{NotesTeX}
\usepackage{tikz,physics,cancel}
\usepackage[T1]{fontenc}
\usepackage{lmodern,mathrsfs}

\title{Title}
\author{Author}
\abstract{Abstract}

\begin{document}

\maketitle

\chapter{Chapter 1}

\clearpage\section{Section 1.1}
\subsection{Subsection 1.1.1}

\clearpage\chapter{Chapter 2}
\clearpage\section{Section 2.1}

\end{document}

I hope I haven't produced a dupe, and many thanks in advance!

2

NotesTeX.sty has

% Footer and header of the body
% the command ``\pagestyle{myplain}'' must be inserted
% just after ``\begin{document}''
\newcommand\ps@myplain{
\pagenumbering{arabic}
\renewcommand\@oddfoot{\hfill-- \thepage\ --\hfill}
\renewcommand\@oddhead{}}
\let\ps@plain=\ps@myplain

which means that every chapter (which does \thispagestyle{plain} runs \pagenumbering{arabic} so resets the counter. that looks like a bug.

I know nothing about that package if you need to use it you may want to make a local copy and remove the line

    \let\ps@plain=\ps@myplain
| improve this answer | |
  • Thank you! Removing that line solves the numbering issue - however, now the page numbers on a new chapter page appear differently to those in later pages. For instance, see page 1 and 3 vs 2 and 4 in the MWE with this modification. Any thoughts on how to handle that? – FH93 Jun 28 '18 at 18:00
  • 1
    The package has also 52 lines like \newcommand{\bfa}{{\bf a}}. :-( – egreg Jun 28 '18 at 18:00
  • 1
    @FH93 perhaps you would prefer to put that \let back but remove the line \pagenumbering{arabic} instead – David Carlisle Jun 28 '18 at 18:03
  • One could redefine \ps@myplain without \pagenumbering{arabic} – egreg Jun 28 '18 at 18:04
  • @DavidCarlisle Perfect. Thanks for your help. – FH93 Jun 28 '18 at 18:04
1

I am the developer of the NotesTeX package. I've known about this bug for a while. There are two issues which contribute to this bug which I have written about below.

First, let me simplify your MWE (there are a few packages which are repeated and may cause overwrite conflicts):

\pdfminorversion=4\relax
\pdfobjcompresslevel=0\relax
\RequirePackage{pdf14}

\documentclass[12pt, a4paper,notitlepage]{report}
\usepackage{NotesTeX}

\title{Title}
\author{Author}
\abstract{Abstract}

\begin{document}

\maketitle

\chapter{Chapter 1}
\clearpage\section{Section 1.1}
\subsection{Subsection 1.1.1}
\clearpage\chapter{Chapter 2}
\clearpage\section{Section 2.1}

\end{document}

I've removed most of the \usepackage{} as most packages you listed are included in NotesTeX. Now onto the actual issue;

  1. Firstly, the chapter heading is not configured in NotesTeX when using the article class. That is on me, I'll need to update it and I'll get right on it!

  2. Secondly, and most importantly, the report class is the root of the page numbering conflict. NotesTeX was built on the Jheppub style and both are configured to work with the article class. Making NotesTeX/Jheppub work with other classes is a tougher challenge.

My suggestion, if you are not attached to the report style, is to use the article class and use part instead of chapter.

| improve this answer | |

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.