Page LayoutHow to force table of contents to not show pages before it?

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
lukaszskowron96
Posts: 36
Joined: Tue Oct 09, 2018 1:01 pm

How to force table of contents to not show pages before it?

Post by lukaszskowron96 »

Hi,

So basically the subject summarises what I want to do.

My document comprises of:

1st page: title page (no page number)
2nd page: abstract (i)
3rd page: acknowledgements (ii)
4th page: table of contents (iii)
5th page: document starts (1)

I want my arabic numbering to start from page 5(I know how to do that) and I want table of contents to be showing everything from 5th page only.

Here is the code I am using:

Code: Select all

\documentclass[toc=sectionentrywithdots,a4paper,11pt]{scrartcl}
\usepackage{graphicx}

\usepackage{setspace}
\doublespacing

\usepackage[a4paper, left=20mm, right=20mm, top=20mm]{geometry}

\usepackage{pdfpages}

\usepackage{fancyhdr}
\pagestyle{fancy}
\rhead{ }
\lhead{ }
\thispagestyle{empty}

\pagenumbering{roman}
\setcounter{page}{1}

\renewcommand{\rmdefault}{phv}
\renewcommand{\sfdefault}{phv}

\usepackage[margin=0pt,font=normalsize]{subcaption}

\counterwithin{figure}{section}

\begin{document} 

\setcounter{page}{0}

Cover Page

\newpage
\lhead{Abstract}
\addcontentsline{toc}{section}{Abstract}
Abstract

\newpage
\lhead{Acknowledgements}
\addcontentsline{toc}{section}{Acknowledgements}
Acknowledgements

\newpage
\lhead{Contents}
\addtocontents{toc}{~\hfill\textbf{Page}\par}
\addcontentsline{toc}{section}{Contents}
\makeatletter
\@starttoc{toc}
\makeatother
\clearpage

\newpage
\pagenumbering{arabic}
\lhead{Chapter 1: Introduction}
\section{Introduction}
\subsection{Introduction}
Introduction

\section{Chapter 2}

\addcontentsline{toc}{section}{References}

 \end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
lukaszskowron96
Posts: 36
Joined: Tue Oct 09, 2018 1:01 pm

How to force table of contents to not show pages before it?

Post by lukaszskowron96 »

I actually sorted it out.

I put:

\usepackage{lipsum}

in the preamble and then after \begin{document}

\pagenumbering{gobble}

Also had to delete all:

\addcontentsline{toc}{section}{...}

I hope somebody finds this helpful!
Post Reply