# Wrong abstract page number and spaces between LoF and LoT with \addcontentsline

How to correct two things in ToC:

• Page number of abstract - should be "vii"
• Spaces above LOF,LOT and Abstract are big. Not like above chapters

?

Currently:

Contents

List of Figures       iii

List of Tables         v

Abstract               i
1 First                1
2 Second               2


Desired:

Contents

List of Figures       iii
List of Tables         v
Abstract              vii
1 First                1
2 Second               2


Code:

\documentclass[a4paper,12pt,twoside,openany]{report}
\usepackage[english]{babel}
\usepackage{makeidx}
\newcommand*{\term}{\textit}
\usepackage[figure,table]{hypcap}
\hypersetup{
bookmarksnumbered,
pdfstartview={FitH},
citecolor={black},
urlcolor={black},
pdfpagemode={UseOutlines}
}
\makeindex

\begin{document}
\title{Title Here}
\author{Author's Name}
\date{}

\pagenumbering{roman}
\tableofcontents

\cleardoublepage
\phantomsection
\listoffigures

\cleardoublepage
\phantomsection
\listoftables

\cleardoublepage
\phantomsection
% \chapter*{Abstract} - When I use it I get chapter heading and abstract on another page
\begin{abstract}
Abstract
\end{abstract}

\pagenumbering{arabic}
\chapter{First}
\label{ch:first}
\chapter{Second}
\label{ch:Second}

\end{document}


I'd like to make it working with hyperref in pdf, that's why I left related code in example.

-

The abstract environment uses the titlepage environment, which resets the page counter, so you get page number i.

If you use the option notitlepage, you will get the correct page number vii.

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

-
...alternatively, probably not as clean, use \renewcommand{\titlepage}{\relax} before the abstract environment. That is because, in the MWE, doesn't use the titlepage environment, but the \titlepage macro. –  Werner Feb 1 '12 at 20:21
Thanks, finally I understand the reason of page numbering reset. –  Grzegorz Wierzowiecki Feb 1 '12 at 21:27
@Werner Thanksm finally I know possible workaround :) –  Grzegorz Wierzowiecki Feb 1 '12 at 21:28

To correct the spacing above the "List of" and "Abstract" ToC entries, replace

\addcontentsline{toc}{part}


with

\addcontentsline{toc}{chapter}


General suggestions: Consider to use

• the book class and its \frontmatter and \mainmatter macros (for roman vs. arabic page numbering),

• the tocbibind package (for adding "Lists of" to the ToC).

As the book class doesn't feature an abstract environment, use \chapter* instead. (EDIT: Stupid me -- just use \chapter, because \frontmatter turns of chapter numbering.)

\documentclass[a4paper,12pt,openany]{book}

\usepackage[nottoc]{tocbibind}

\usepackage[english]{babel}
\usepackage{makeidx}
\makeindex
\newcommand*{\term}{\textit}
\usepackage[figure,table]{hypcap}
\hypersetup{
bookmarksnumbered,
pdfstartview={FitH},
citecolor={black},
urlcolor={black},
pdfpagemode={UseOutlines}
}

\begin{document}

\frontmatter

\title{Title Here}
\author{Author's Name}
\date{}

\tableofcontents

\listoffigures

\listoftables

\chapter{Abstract}

Abstract

\mainmatter

\chapter{First}
\label{ch:first}

\chapter{Second}
\label{ch:Second}

\end{document}

-
I will experiment with book class later. Currently I will try to fix report setup. –  Grzegorz Wierzowiecki Feb 1 '12 at 21:31
Thanks to you, I've found \addcontentsline{toc}{section}{List of Tables} is what i really need :). –  Grzegorz Wierzowiecki Feb 1 '12 at 21:34