0

I'm preparing a section that is going into a larger document. So I only have control of my section, not the whole document. I need all page numbering to start with 4.x. So the first page is 4.1, then 4.2, etc. I need the table of contents and page numbers on each page to reflect this numbering scheme.

How do I make numbering start with 4.1 and increment in the decimal area?

JD Long
  • 105
  • 4

1 Answers1

2

You could redefine \thepage as in the following example:

\documentclass{article}
\usepackage{lipsum}
\renewcommand{\thepage}{4.\arabic{page}}
\begin{document}
\lipsum
\end{document}

An elegant solution on how to automatically use \thesection instead of manually entering the number can be found here: Latex page numbering by section

leandriis
  • 62,593
  • That's amazingly easy! I am new to LaTex, so I really appreciate your remedial help! – JD Long Jan 05 '18 at 15:38
  • 1
    @JDLong You're welcome. I have added a link to an answer that might come in handy if you want to add the current section's number in the large document automatically. – leandriis Jan 05 '18 at 15:48
  • It just breaks down when using a TOC... unless you actually want "Section title .... some long prefix Page X" in your TOC. – Stingery Sep 19 '18 at 16:48
  • @Stingery: You're right. My answer did not take into account using a toc. Unfortunately I can not exactly tell from your comment what problem you have regarding the toc. Is it the possible overlap of the section title with the page number? (That could be resolved using the tocloft package and its \cftsetpnumwidth and \cftsetrmarg commands.) or do you want to have the page number but without the prefix in your toc? – leandriis Sep 20 '18 at 07:53
  • @leandriis, yes, ideally with prefix in the footer (or wherever), but not in the TOC. – Stingery Sep 21 '18 at 00:28
  • @Stingery: That's unfortunately something that I personally can't help you with. Maybe you're better off asking a separate follow up question to this one. – leandriis Sep 24 '18 at 18:15