Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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[colorlinks]{hyperref}
\usepackage[figure,table]{hypcap}
\hypersetup{
    bookmarksnumbered,
    pdfstartview={FitH},
    citecolor={black},
    linkcolor={black},
    urlcolor={black},
    pdfpagemode={UseOutlines}
}
\makeindex

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

\pagenumbering{roman}
\tableofcontents

\cleardoublepage
\phantomsection
\addcontentsline{toc}{part}{List of Figures}
\listoffigures

\cleardoublepage
\phantomsection
\addcontentsline{toc}{part}{List of Tables}
\listoftables

\cleardoublepage
\phantomsection
\addcontentsline{toc}{part}{Abstract}
% \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.

share|improve this question

2 Answers 2

up vote 4 down vote accepted

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}
share|improve this answer
1  
...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[colorlinks]{hyperref}
\usepackage[figure,table]{hypcap}
\hypersetup{
    bookmarksnumbered,
    pdfstartview={FitH},
    citecolor={black},
    linkcolor={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}
share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.