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.

This was my first attempt at Latex. I am using LaTeXila. I fail to understand why my table of contents reproduces my entire report and then assigns it a page number:

Contents
0.1 1 A bin of 50 manufactured parts contain three defective parts and 47 non-defective parts. ... Implement Bubble sort and Randomized Quicksort and make a comparative report of their performance . . . . . . . . . . . . . . . . . . . . . 2

The 'code' part:

\begin{document}

\maketitle{}  
\tableofcontents{  
\begin {enumerate}  
\item {question 1}\item {question 2}\item {question 3}\item {question 4}  
\end{enumerate}}  

%\chapter{Assignment}  
\begin{section} {1 A bin of 50 manufactured parts contain three defective parts and 47 non-defective parts. ... Implement Bubble sort and Randomized Quicksort and make a comparative report of their performance }   
\end{section}  
\end{document}
share|improve this question

1 Answer 1

up vote 4 down vote accepted

\maketitle \tableofcontents and \item do not take {...} arguments, and \section is not an environment. I think you want something like this:

enter image description here

\documentclass{report}



\title{hmm}
\author{me}
\begin{document}

\maketitle
\tableofcontents

\clearpage

\begin {enumerate}
\item question 1
\item question 2
\item question 3
\item question 4
\end{enumerate}

\chapter{Assignment}
\section{something}
 1 A bin of 50 manufactured parts contain three defective parts and 47 non-defective parts. ... Implement Bubble sort and Randomized Quicksort and make a comparative report of their performance 

\end{document}
share|improve this answer
    
Works great! I don't want to see that 'Chapter 1' written over there. How to get rid of that? (you might have noticed I have commented that line in my code) –  pnp Sep 3 '12 at 11:36
1  
If you don't want it to be in chapter 1 delete the \chapter command. (If you don't want chapters at all use \documentcass{article} not report as then teh top level sectioning unit is section. –  David Carlisle Sep 3 '12 at 11:41

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.