Page Layoutincludepdf TOC numbers

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
vaalsta
Posts: 9
Joined: Tue Jul 20, 2010 9:59 am

includepdf TOC numbers

Post by vaalsta »

After the titlepage of my report I want to have three pages before the contents page (letter, abstract, acknowledgements) with page numbers i, ii, iii. The letter page is a pdf included with \includepdf. I want the contents page to include all these sections (with their appropriate page numbers) but without section numbers.

The way I have it the abstract and acknowledgement sections display correctly on the toc (I used section*) but the includepdf page (letter to the dean) shows the section number with a big 0.1 at the start of the line. How do I get rid of this?

btw: This is my first attempt at a MWE. I wasn't sure what to do with the deanletter.pdf.

Code: Select all

\documentclass[a4paper,twoside,12pt]{report}
\usepackage[final]{pdfpages}
\usepackage[USenglish]{babel}
\title{Thesis Title}
\author{Me}

\begin{document}

\pagenumbering{roman}
\maketitle
\newpage
\setcounter{page}{1}
\includepdf[addtotoc={1,section,1,Letter to the Dean,letter}]{./sections/deanletter.pdf}

\section*{Abstract}
\addcontentsline{toc}{section}{\numberline{}Abstract}
This is the text of the abstract
\newpage


\section*{Acknowledgements}
\addcontentsline{toc}{section}{\numberline{}Acknowledgements}
Thanks etc.

\tableofcontents %Table of contents

\newpage
\pagenumbering{arabic}
\chapter{Introduction}

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

includepdf TOC numbers

Post by meho_r »

This?:

Code: Select all

\addcontentsline{toc}{section}{\numberline{}Letter to the Dean}%
\includepdf{./sections/deanletter.pdf}
You may attach files using "Upload attachment" tab just below the box you're writing in.
vaalsta
Posts: 9
Joined: Tue Jul 20, 2010 9:59 am

includepdf TOC numbers

Post by vaalsta »

Ahh, I solved it. I'm not sure why it works (maybe someone could enlighten me) but if I change the includepdf option from:

Code: Select all

\includepdf[addtotoc={1,subsection,3,Letter to the Dean,letter}]{./sections/deanletter.pdf}
to:

Code: Select all

\includepdf[addtotoc={1,section,1,Letter to the Dean,letter}]{./sections/deanletter.pdf}
it doesn't display the numbering and correctly aligns the text.
Post Reply